Type Explanations

Lists and describes the methods available on

Noise2D

Noise2D is TFC’s base type for noise functions with two dimensions. It has the following methods:

  • : Gets the value of the noise at the given x-z point
  • : Applies an octave function to the noise, overlaying weaker, more spread copies of the noise on top of itself
  • : Creates a ridged noise using absolute values. Expects the noise’s value to be in the range [-1, 1]
  • : Takes the absolute value of the function
  • : Creates ‘terraces’ by taking the nearest level and rounding. Expects the noise’s value to be in the range [-1, 1]
  • : Scales the input dimension of the noise by the given scale factor
  • : Maps the output value, expected to be in the range [-1, 1], to the given min and max values
  • : Re-scales the output of the noise to a new range
  • : Scales then shifts the noise output
  • : Uses the FastNoiseLite of the simplex noise to domain warp this noise
  • : Clamps the noise to the given range
  • : Sums this noise and the other
  • : Multiplies the two noises
  • : Maps the output of this noise by the given function
  • : Swaps the input axes
  • : Rotates the input axes by the given angle (in degrees)

OpenSimplex2D

OpenSimplex2D is an implementation of Noise2D which uses FastNoiseLite’s OpenSimplex noise type.

Cellular2D

Cellular2D is an implementation of Noise2D specialized to have polygonal blobs of constant value, instead of smooth, constantly changing values. It has these additional methods:

  • : Converts the Cell to value via a function
  • : Gets the Cell at the given x-z point. Cell is an object with the following methods
    • .x(): The x ‘coordinate’ of the center of this cell
    • .y(): The y ‘coordinate’ of the center of this cell
    • .cx(): The x ‘coordinate’ of this cell
    • .cy(): The y ‘coordinate’ of this cell
    • .f1(): The normalized distance from the center of a cell
    • .f2(): The normalized distance from the center of a edge of a cell
    • .noise(): The noise value of the cell

Noise3D

Noise3D is TFC’s base type for noise functions with with tree dimensions. It has the following methods:

  • : Gets the value of noise at the give x-y-z point
  • : Applies an octave function to this noise, overlaying weaker, more spread out copies of the noise on top of itself
  • : Scales the input dimensions of the noise by the given scale factor
  • : Maps the output value, expected to be in the range [-1, 1], to the given min and max values
  • : Re-scales the output of the noise to a new range
  • : Uses the FastNoiseLite of the simplex noise to domain warp this noise
  • : Swaps the x and z axes
  • : Swaps the x and y axes
  • : Swaps the y and z axes
  • : Dissolves the Noise3D to a Noise2D by using the provided Noise2D as the input y-value at a given x-z coordinate
  • : Rotates the noise around the x axis
  • : Rotates the noise around the y axis
  • : Rotates the noise around the z axis

OpenSimplex3D

OpenSimplex3D is an implementation of Noise3D which uses FastNoiseLite’s OpenSimplex noise type

Cellular3D

Cellular3D is an implementation of Noise3D specialized to have polyhedral blobs of constant value, instead of smooth, constantly changing values. It has these additional methods:

  • : Gets the Cell at the given x-y-z point. Cell is an object with the following methods:
    • .x(): The x ‘coordinate’ of the cell
    • .y(): The y ‘coordinate’ of the cell
    • .z(): The z ‘coordinate’ of the cell
    • .f1(): The normalized distance from the center of a cell
    • .f2(): The normalized distance from the center of a face of a cell
    • .noise(): The noise value of the cell

ChunkData

ChunkData is TFC’s additional data it attaches to chunks during chunk generation for use during and after world generation. It has the following methods:

  • : Get the ChunkPos that data is attached to
  • : Get the chunk’s RockData
  • : Get the chunk’s aquifer surface heights as an array of ints. The array has sixteen elements, representing aquifer heights at a QuartPos resolution
  • : Get the interpolated rainfall value at the given position
  • : Get the interpolated rainfall value at the given x and z coordinates
  • : Get the interpolated average temperature value at the given position
  • : Get the interpolated average temperature value at the given x and z coordinates
  • : Get the chunk’s ForestType
  • : Get the chunk’s forest weirdness value
  • : Get the chunk’s forest density value
  • : Gets the Status of the chunk data
  • : Promotes the chunk data to PARTIAL from EMPTY and fills in the temperature, rainfall, and forest values of the chunk. Has five parameters, in order they are:
    • rainfallLayer: LerpFloatLayer: A LerpFloatLayer of the yearly average rainfall at the corners of the chunk. Using in climate models to determine the rainfall at a position
    • temperatureLayer: LerpFloatLayer: A LerpFloatLayer of the yearly average temperature at the corners of the chunk. Used by climate models to determine the average temperature at a position
    • forestType: ForestType: The forest type of the chunk, may be none, sparse, edge, normal, or old_growth
    • forestWeirdness: float: The forest ‘weirdness’ of the chunk, in the range [0, 1]. Used by TFC’s forest configured feature
    • forestDensity: float: The forest density of the chunk, in the range [0, 1]. Used by TFC’s forest configured feature
  • : Promotes the chunk data from PARTIAL to FULL and fills in the chunk’s surface and aquifer heights. Has two parameters, in order they are:
    • surfaceHeight: int[256]: An array of integer values of size 2561 representing the surface height of the world. Values indexes are x + 16 * z where x and z are the local x and z coordinates within the chunk and are in the range [0, 15]. For custom chunk data providers, this is where the surfaceY parameter of the RocksGetter callback is gotten from
    • aquiferSurfaceHeight: int[16]: An array of integer values of size 162 representing the height of aquifer surfaces. Only used by TFCAquifers

LayeredArea

LayeredArea is a specialized version of TFC’s Area, an AreaSource overlaid with multiple TransformLayers which can be thought of as a pseudo-Noise2D, designed to be easily made, edited, and used in scripts. It has the following methods:

  • : Gets the value at the given x-z point
  • : Applies a zoom layer to the area, effectively doubling the ‘resolution’ of the area. The params are:
    • fuzzy: boolean: If the zooming function should apply a smoothing operation along value boundaries
    • seed: long: The seed for the AreaContext’s random
  • : Applies a smoothing layer to the area. The param is the seed used by the AreaContext’s random
  • : Applies an arbitrary TransformLayer to the area. The params are:
    • transformer: TransformLayer: The transformer
    • seed: long: The seed used by the AreaContext’s random
  • : Applies an arbitrary TransformLayer that has access to neighboring values. The params are:
    • transformer: AdjacentTransformLayer: The transformer
    • seed: long: The seed used by the AreaContext’s random
  • : Merges this LayeredArea with another via the given Mergelayer. The params are:
    • merger: MergeLayer: A callback which merges the two LayeredAreas together. Has the following params:
      • context: AreaContext: The seeded AreaContext at the point
      • first: Area: The Area from this LayeredArea
      • second: Area: The Area from the other LayeredArea
      • x: int: The x position being queried
      • z: int: The z position being queried
      • return: int: The return value
    • otherLayeredArea: LayeredArea: The LayeredArea to merge with this one
    • seed: long: The seed by the AreaContext’s random

SourceLayer

SourceLayer is a functional interface that originates a LayeredArea. It can be created in scripts as a callback with the params:

  • context: AreaContext: The seeded AreaContext at the point
  • x: int: The x position being queried
  • z: int: The z position being queried
  • return: int: The return value

TransformLayer

Transformlayer is a functional interface that transforms the result of a LayeredArea. It can be created in scripts as a callback with the following params:

  • context: AreaContext: The AreaContext of the layer
  • area: Area: The Area of the LayeredArea
  • x: int: The x position being queried
  • z: int: The z position being queried
  • return: int: The return value

AdjacentTransformLayer

AdjacentTransformlayer is a functional interface that transforms the result of a LayeredArea. It can be created in scripts as a callback with the following params:

  • context: AreaContext: The AreaContext of the layer
  • north: int: The value immediately north of the center position
  • east: int: The value immediately east of the center position
  • south: int: The value immediately south of the center position
  • west: int: The value immediately west of the center position
  • center: int: The value at the queried position
  • return: int: The return value

AreaContext

AreaContext is an object which provides some utility methods for making random choices in layer transformations. it has the following methods:

  • .random(): RandomSource: Gets the RandomSource used by the context to make choices
  • .choose(first: int, second: int): int: Randomly chooses between the two options and returns the selection
  • .choose(first: int, second: int, third: int, fourth: int): int: Randomly chooses between the four options and returns the selection

Area

Areas are objects which represent a value source and the sum contribution of all layers applied to a LayeredArea. It has one method:

  • .get(x: int, z: int): int: Gets the value at the given x-z point

NamedRegistryMetal

A NamedRegistryMetal is an easy way to access the items, blocks, and fluid associated with a metal. It has the following methods:

  • : Get the mod id the metal is added by
  • : Get a possibly null supplier for the block of the given type. Accepts anvil, block, block_slab, block_stairs, bars, chain, lamp, or trapdoor
  • : Get a possibly null supplier for the item of the given type. Accepts ingot, double_ingot, sheet, double_sheet, rod, tuyere, fish_hook, fishing_rod, unfinished_lamp, pickaxe, pickaxe_head, propick, propick_head, axe, axe_head, shovel, shovel_head, hoe, hoe_head, chisel, chisel_head, hammer, hammer_head, saw, saw_head, javelin, javelin_head, sword, sword_blade, mace, mace_head, knife, knife_head, scythe, scythe_head, shears, unhinished_helmet, helmet, unfinished_chestplate, chestplate, unfinished_greaves, greaves, unfinished_boots, boots, horse_armor, or shield
  • : Get the possibly null supplier for the source fluid of the metal
  • : Get the tool tier of the metal and all tools it contains
  • : Get the armor material of the metal and all armor pieces it contains
  • : Get the tier of the metal, typically the tier of working recipes its metal can handle
  • : Get a supplier for the metal’s full block
  • : Get the map color of the blocks contained by this metal
  • : Get the rarity of the items contained by this metal
  • : Get the name of the metal

NamedRegistryWood

A NamedRegistryWood is an easy way to access the blocks associated with a wood type. It has the following methods:

  • : Get the mod id the wood is added by
  • : Get the map color of the blocks contained by the wood
  • : Get the map color of the barks of the wood
  • : Get the TFCTreeGrower of the wood
  • : Gets the number of days it takes for the wood’s sapling to grow
  • : Get the vertical coordinate, in the range [0, 255], on the foliage_fall colormap for this wood’s leaves
  • : Get a possibly null supplier for the block of the given type. Accepts log, stripped_log, wood, stripped_wood, leaveas, planks, sapling, potted_sapling, bookshelf, door, trapdoor, fence, log_fence, fence_gate, button, pressure_plate, slab, stairs, too_rack, twig, fallen_leaves, vertical_support, horizontal_support, workbench, trapped_chest, chest, loom, sluice, sign, wall_sign, barrel, lectern, scribing_table, sewing_table, jar_shelf, axle, bladed_axle, encased_axle, clutch, gear_box, windmill, or water_wheel
  • : Get the vanilla BlockSetType of the wood
  • : Get the vanilla wood type of the wood
  • : Get the name of the wood
  1. 16 * 16; BlockPos resolution 

  2. 4 * 4; QuartPos resolution