Type Explanations

There are several Java types which can be encountered fairly frequently in the docs or are too complex to describe in-line along with other, perhaps more pertinent, information. Those are collected here


ChunkData

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

  • : Get the ChunkPos the data is attached to
  • : Get the chunk’s RockData
  • : Gets the chunk’s aquifer surface heights as an array of 161 ints representing the aquifer surface elevations
  • : Get the minimum hydration a block at the given position can experience due to rain
  • : Get the maximum hydration a block at the given position can experience due to rain
  • : Get the time-invariant rainfall at the given position
  • : Get the time-invariant rainfall at the given position
  • : Get the rain variance at the given position
  • : Get the rain variance at the given position
  • : Get the base groundwater at the given position
  • : Gets the base groundwater at the given position
  • : Get the time-invariant total groundwater (rivers + rainfall) at the given position
  • : Get the time-invariant total groundwater (rivers + rainfall) at the given position
  • : Get the average sea-level temperature at the given position
  • : Get the average sea-level temperature at the given position
  • : Get the ForestType of the chunk
  • : Get the Status of the chunk
  • : The last calendar timestamp the chunk was random ticked in
  • : Sets the last random tick of the chunk
    • chunk: ChunkAccess: The chunk the data is for, required to mark it as unsaved and sync the data to clients
    • lastRandomTick: int: The calendar tick at which the chunk was last randomly ticked
  • : Get the next position that will be snowed on in the chunk, the y-coordinate will always be 0
  • : Moves the chunk to the next snow pos and marks the chunk as unsaved
  • : Promotes the chunk data from empty to partial status by setting some of its properties
    • rainfallLayer: LerpFloatLayer: A LerpFloatLayer of the yearly average rainfall at the corners of the chunk. Used in the default climate model to determine the rainfall at a position
    • rainVarianceLayer: LerpFloatLayer: A LerpFloatLayer of the rainfall variance at the corners of the chunk. used by the default climate model for rain variance at a point
    • baseGroundwaterLayer: LerpFloatLayer: A LerpFloatLayer of the base groundwater at the corners of the chunk. Used by the default climate model for base groundwater values
    • temperatureLayer: LerpFloatLayer: A LerpFloatLayer of the average temperature at the corners of the chunk. Used by the default climate model for average seal-level temperatures
    • forestType: ForestType: The ForestType of the chunk
  • : Promotes the chunk data from partial to full by setting the surface heights
    • surfaceHeight: int[256]: An array of integer values of size 2562 representing the surface height of the world. Values are indexed as 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 parameters of the RocksGetter callback is gotten from
    • aquiferSurfaceHeights[16]: An array of integer values of size 161 representing the height of aquifer surfaces. Only used by TFCAquifers
  • : Tweaks the chunks base groundwater layer according to the surface height
  • : Modifies an individual groundwater point, used by .modifyBaseGroundwater(int,number)

RockData

RockData is a component of ChunkData focusing on rock-related information

  1. 4 * 4; QuartPos resolution  2

  2. 16 * 16; BlockPos resolution 


ClimateModel

A climate model is TFC’s way of calculating information about a level’s temperature, rainfall, groundwater, wind, and other climatic properties at a position at a specific time or for a yearly average

Climate models have several methods to retrieve the above mentioned information

  • : The hemisphere scale. Effectively the distance between the polar and equatorial region in blocks
  • : Get the yearly average temperature, in °C, at the given position
  • : Get the current temperature, in °C, at the given position
  • : Get the temperature, in °C, at the given calendar tick and position
  • : Get the average temperature, in °C, at the given position over the given calendar tick range
  • : Get the yearly average rainfall, in mm/yr, at the given position
  • : Get the annual rainfall variance, in the range [-1, 1], at the given position. Positive values indicate wet summers, while negative values indicate wet winters
  • : Get the current rainfall, in mm/yr, at the given position
  • : Get the rainfall, in mm/yr, at the given calendar tick and position
  • : Get the average rainfall, in mm/yr, at the given position over the given calendar tick range
  • : Get the base groundwater level, in mm, at the given position
  • : Get the yearly average base groundwater level, in mm, at the given position
  • : Get the current groundwater level, in mm, at the given position
  • : Get the base groundwater, in mm, at the given calendar tick and position
  • : Get the average groundwater level, in mm, at the given position over the given calendar tick range
  • : Get the rainfall intensity, generally in the range [0, 1], at the given calendar tick
  • : Get if it is thundering at the given calendar tick
  • : If the model supports historical querying of rainfall and if TFC should override a level’s rainfall intensity with that of the model
  • : Get the current wind vector at the given position
  • : Ge the wind vector at the given calendar tick and position
  • : Get the current fog value, in the range [0, 1], for the given position

ForestType Enum

There are 29 forest types, each with values for

  • The type/category
  • The numeric density, in the range [0, 4]
  • The number of trees to place per chunk
  • The number of groundcover objects to place per chunk
  • The number of leaf piles to place per chunk
  • The number of bushes to place per chunk
  • The maximum number of tree types in a forest entry that can spawn
  • The chance per chunk, in the range [0, 1], a tree will be placed in a forest entry
  • The maximum number of forest entries alternatives that may be dropped when placing a forest

  • grassland; ordinal 0
    • Type: none
    • Density: 0
    • Trees: 0
    • Groundcover: 0
    • Leaf piles: 0
    • Bushes: 0
    • Tree types: 2
    • Chance: 0
    • Alternatives: 0
  • clearing; ordinal 1
    • All values are the same as grassland
  • shrubland; ordinal 2
    • Type: none
    • Density: 0
    • Trees: 0
    • Groundcover: 10
    • Leaf piles: [0, 1]
    • Bushes: [2, 7]
    • Tree types: 2
    • Chance: 1
    • Alternatives: 0
  • sparse; ordinal 3
    • Type: none
    • Density: 0
    • Trees: 2
    • Groundcover: 6
    • Leaf piles: 0
    • Bushes: [0, 2]
    • Tree types: 2
    • Chance: 0.08
    • Alternatives: 0
  • savanna_monoculture; ordinal 4
    • Type: savanna
    • Density: 1
    • Trees: 3
    • Groundcover: 6
    • Leaf piles: 0
    • Bushes: [0, 2]
    • Tree types: 1
    • Chance: 0.55
    • Alternatives: 0
  • savanna_diverse; ordinal 5
    • Type: savanna
    • Density: 1
    • Trees: 3
    • Groundcover: 6
    • Leaf piles: 0
    • Bushes: [0, 2]
    • Tree types: 2
    • Chance: 0.65
    • Alternatives: 0
  • savanna_alternative; ordinal 6
    • Type: savanna
    • Density: 1
    • Trees: 3
    • Groundcover: 6
    • Leaf piles: 0
    • Bushes: [0, 2]
    • Tree types: 3
    • Chance: 0.4
    • Alternatives: 2
  • savanna_shrub_monoculture; ordinal 7
    • Type: savanna
    • Density: 1
    • Trees: 1
    • Groundcover: 6
    • Leaf piles: 0
    • Bushes: [3, 6]
    • Tree types: 1
    • Chance: 0.9
    • Alternatives: 0
  • savanna_shrub_diverse; ordinal 8
    • Type: savanna
    • Density: 1
    • Trees: 1
    • Groundcover: 6
    • Leaf piles: 0
    • Bushes: [3, 6]
    • Tree types: 2
    • Chance: 1
    • Alternatives: 0
  • savanna_shrub_alternative; ordinal 9
    • Type: savanna
    • Density: 1
    • Trees: 1
    • Groundcover: 6
    • Leaf piles: 0
    • Bushes: [3, 6]
    • Tree types: 3
    • Chance: 0.8
    • Alternatives: 2
  • primary_monoculture; ordinal 10
    • Type: primary
    • Density: 3
    • Trees: 5
    • Groundcover: 25
    • Leaf piles: [0, 1]
    • Bushes: 0
    • Tree types: 1
    • Chance: 1
    • Alternatives: 0
  • primary_diverse; ordinal 11
    • Type: primary
    • Density: 4
    • Trees: 7
    • Groundcover: 40
    • Leaf piles: [0, 1]
    • Bushes: [0, 3]
    • Tree types: 2
    • Chance: 1
    • Alternatives: 0
  • primary_alternative; ordinal 12
    • Type: primary
    • Density: 7
    • Trees: 40
    • Groundcover: 40
    • Leaf piles: [0, 1]
    • Bushes: [0, 3]
    • Tree types: 3
    • Chance: 1
    • Alternatives: 2
  • secondary_monoculture; ordinal 13
    • Type: secondary
    • Density: 3
    • Trees: 5
    • Groundcover: 25
    • Leaf piles: 0
    • Bushes: [1, 2]
    • Tree types: 1
    • Chance: 1
    • Alternatives: 0
  • secondary_monoculture_tall; ordinal 14
    • Type: secondary
    • Density: 3
    • Trees: 5
    • Groundcover: 25
    • Leaf piles: 0
    • Bushes: [1, 2]
    • Tree types: 1
    • Chance: 1
    • Alternatives: 0
  • secondary_diverse; ordinal 15
    • Type: secondary
    • Density: 3
    • Trees: 5
    • Groundcover: 25
    • Leaf piles: 0
    • Bushes: [1, 2]
    • Tree types: 2
    • Chance: 1
    • Alternatives: 0
  • secondary_bamboo; ordinal 16
    • Type: secondary
    • Density: 3
    • Trees: 1
    • Groundcover: 25
    • Leaf piles: [0, 1]
    • Bushes: [0, 1]
    • Tree types: 2
    • Chance: 0.3
    • Alternatives: 0
  • secondary_diverse_tall; ordinal 17
    • Type: secondary
    • Density: 3
    • Trees: 5
    • Groundcover: 25
    • Leaf piles: 0
    • Bushes: [1, 2]
    • Tree types: 2
    • Chance: 1
    • Alternatives: 0
  • secondary_dense; ordinal 18
    • Type: secondary
    • Density: 4
    • Trees: 7
    • Groundcover: 40
    • Leaf piles: [0, 1]
    • Bushes: 3
    • Tree Types: 2
    • Chance: 1
    • Alternatives: 0
  • secondary_dense_tall; ordinal 19
    • Type: secondary
    • Density: 4
    • Trees: 7
    • Groundcover: 40
    • Leaf piles: [0, 1]
    • Bushes: 3
    • Tree types: 2
    • Chance: 1
    • Alternatives: 0
  • secondary_alternative; ordinal 20
    • Type: secondary
    • Density: 3
    • Trees: 5
    • Groundcover: 25
    • Leaf piles: 0
    • Bushes: [1, 2]
    • Tree types: 3
    • Chance: 1
    • Alternatives: 2
  • edge_monoculture; ordinal 21
    • Type: edge
    • Density: 2
    • Trees: 2
    • Groundcover: 10
    • Leaf piles: [0, 1]
    • Bushes: [0, 1]
    • Tree types: 1
    • Chance: 1
    • Alternatives: 0
  • edge_diverse; ordinal 22
    • Type: edge
    • Density: 2
    • Trees: 2
    • Groundcover: 10
    • Leaf piles: [0, 1]
    • Bushes: [0, 1]
    • Tree types: 2
    • Chance: 1
    • Alternatives: 0
  • edge_alternative; ordinal 23
    • Type: edge
    • Density: 2
    • Trees: 2
    • Groundcover: 2
    • Leaf piles: [0, 1]
    • Bushes: [0, 1]
    • Tree types: 3
    • Chance: 1
    • Alternatives: 2
  • edge_bamboo; ordinal 24
    • Type: edge
    • Density: 2
    • Trees: 1
    • Groundcover: 10
    • Leaf piles: [0, 1]
    • Bushes: [0, 1]
    • Tree types: 1
    • Chance: 0.7
    • Alternatives: 0
  • dead_monoculture; ordinal 25
    • Type: dead
    • Density: 2
    • Trees: 5
    • Groundcover: 25
    • Leaf piles: 0
    • Bushes: [2, 4]
    • Tree types: 1
    • Chance: 1
    • Alternatives: 0
  • dead_diverse; ordinal 26
    • Type: dead
    • Density: 2
    • Trees: 5
    • Groundcover: 25
    • Leaf piles: 0
    • Bushes: [2, 4]
    • Tree types: 2
    • Chance: 1
    • Alternatives: 0
  • dead_alternative; ordinal 27
    • Type: dead
    • Density: 3
    • Trees: 4
    • Groundcover: 40
    • Leaf piles: [0, 1]
    • Bushes: [0, 3]
    • Tree types: 3
    • Chance: 1
    • Alternatives: 2
  • dead_bamboo; ordinal 28
    • Type: dead
    • Density: 3
    • Trees: 4
    • Groundcover: 25
    • Leaf piles: [0, 1]
    • Bushes: [2, 4]
    • Tree types: 2
    • Chance: 1
    • Alternatives: 0

ICalendar

A calendar instance that holds information about the world time and TFC’s system of tracking ticks. ICalendars can be retrieved via the TFC.calendar sub-binding. Calendars have two internal tick counts

  • playerTicks, or simply ticks, are a monotonic, constantly increasing count of how many ticks have passed since the world began. They are global across dimensions and not synced with the day/night cycle. These should be used for saving/comparing timestamps
  • calendarTicks are a representation of the seasonal and daytime calendar and may pause or be reversed. These are never safe to use as timestamps

Calendars have several methods from which time information can be gotten

  • : Get the absolute amount of ticks passed since the world was created, pausing only when players are offline. Safe to use for calendar timestamps
  • : Get the number of ticks in a single calendar tick hour
  • : Get the number of ticks since Jan 1, 1000
  • : Get the number of days in a month
  • : Get the expected calendar tick after the given player tick offset
  • : Get the expected calendar ticks (duration) represented by the player tick offset. This should be independent with respect to time, but should not be used for incrementing from a calendar tick, use .getCalendarTickFromOffset(int) for that instead
  • : Get the total amount of days passed since Jan 1, 1000
  • : Get the display year, starting at 1000
  • : Get the numeric day of the month
  • : Get the fractional progress, in the range [0, 1], of the current hour
  • : Get the fractional progress, in the range [0, 1], of the current day, where 0 indicates midnight and 0.5 is noon
  • : Get the fraction progress, in the range [0, 1], of the current month
  • : Get the fraction progress, in the range [0, 1], of the current year
  • : Get a text component representation of the current day
  • : Get a text component of the current birthday, or an empty component if none
  • : Get the current Month of the ‘seasonal year’ for a hemisphere
  • : Get the Month of the ‘seasonal year’ for the hemisphere and calendar tick
  • : Get the current Month of the year in calendar time. Should be used when displaying a calendar month by name or when using absolute time, rather than time-of-year
  • : Get the total number of ticks in a month
  • : Get the total number of ticks in a year
  • : Get a text component displaying the current time and date in HH:MM month DD, YYYY form
  • : Get a text component displaying the current time in HH:MM form
  • : Get the current hour of the day, in the range [0, 23]
  • : Get the current minute of the hour, in the range [0, 59]
  • : Get a text component displaying the given timestamp in HH:MM month DD, YYYY form
  • : Get a text component displaying the time, in HH:MM month DD, YYYY form, at the given player tick offset from now
  • : Get a text component displaying a time delta of the given number of player ticks
  • : Get a text component displaying a length of time equal to the given player tick offset
  • : Get the current timestamp, returns the save value as .getTicks()
  • : If the calendar is for the logical server side
  • : Performs a calendar transaction, allowing the player tick of the calendar to be transiently modified. Transactions have two methods which change the player tick, but only within the callback
    • .add(ticks: int): void: Add a certain amount of ticks to the calendar within the transaction
    • .ticks(): int: Get the total number of ticks that have been added within the transaction

ItemStackProvider

An ItemStackProvider is a recipe output, effectively an ItemStack with a list of transformations which are applied to it at completion of the recipe. It can be created using the dedicated sub-binding or, when required as a method argument, by passing in an ItemStack or anything that will wrap to an ItemStack

Providers have several methods by which they can be used and modified

  • : Get the base output ItemStack of the provider
  • : Get the provider’s list of modifiers
  • : Get the output stack of the provider, for the given input stack, assuming the input is a single item
  • : .getSingleStack(ItemStack) but for display-only (no_random_chance) contexts
  • : Get the output stack of the provider, without taking the input stack into consideration
  • : Get the output stack of the provider, for the given input stack. Note: The presence of CopyInputModifiers may cause the resultant stack to have the same stack size as the input, if that is not desired use .getSingleStack(ItemStack)
  • : Get the output stack of the provider, for the given input stack and context. The context may be either default or no_random_chance and the note in .getStack(ItemStack) also applies
  • : If any of the provider’s modifiers depend on the input stack
  • : If the provider has no modifiers and its stack is empty
  • : Serializes the provider to json
  • : Serializes the provider to nbt
  • : Copies the provider with a mutable modifier list
  • : Copies the provider with an immutable modifier list
  • : Adds the given modifier to the provider
  • : Parses the given json as an ItemStackModifer and adds it to the provider
  • : Adds a modifier of the given type, only valid for modifiers with no additional parameters
  • : Adds a tfc:copy_input modifier to the provider
  • : Adds a tfc:copy_food modifier to the provider
  • : Adds a tfc:copy_oldest_food modifier to the provider
  • : Adds a tfc:copy_heat modifier to the provider. Copies the input stack’s temperature to the output stack
  • : Adds a tfc:copy_forging_bonus modifier to the provider. Copies the input stack’s forging bonus to the output
  • : Adds a tfc:reset_food modifier to the provider
  • : Adds a tfc:empty_bowl modifier to the provider. Sets the output stack to the contents of the input’s tfc:bowl component or minecraft:bowl if not present
  • : Adds a tfc:add_bait_to_rod modifier to the provider
  • : Adds a tfc:add_glass modifier to the provider
  • : Adds a tfc:add_powder modifier to the provider
  • : Adds a tfc:crafting_remainder modifier to the provider. Sets the output to the crafting remainder of the input stack
  • : Adds a tfc:damage_crafting_remainder modifier to the provider. Sets the output to the input if it has durability and removes durability if possible
  • : Adds a tfc:add_trait modifier to the provider. Adds the given trait to the output
  • : Adds a tfc:remove_trait modifier to the provider. Removes the given trait from the output
  • : Adds a tfc:add_heat modifier to the provider. Increases the output’s temperature by the given amount, in °C
  • : Adds a tfc:dye_leather modifier, which adds the given color to dyeable items, to the provider. Adds the given color to dyable items
  • : Adds a tfc:remove_dye modifier to the provider
  • : Adds a tfc:meal modifier to the provider
    • food: FoodData: …
    • portions...: MealPortion[]: …
  • : Adds a tfc:extra_products modifier to the provider. Gives the provided stack to the player, if present
  • : Adds a tfc:chance modifier to the provider. Applies the chance, in the range [0, 1], to the output

LayeredArea

LayeredArea is a specialized version of TFC’s Area, an AreaSource overlaid with multiple TransformLayers which can be though 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/dither-like operation along value boundaries
    • seed: int: 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: int: 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: int: The seed used by the AreaContext’s random
  • : Merges the 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 the LayeredArea being merged into
      • 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 resultant value of the merge
    • otherLayeredArea: LayeredArea: The LayeredArea to merge with this one
    • seed: int: The seed used 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

AreaContexts provide some utility methods for making random choices in a thread-safe manner in layer transformation and sourcing. It has the following methods:

  • .random(): RandomSource: Gets the RandomSource used by the context to make choices
  • .choose(first: int, second: int): int: Makes a random choice between the two given values
  • .choose(first: int, second: int, third: int, fourth: int): int: Makes a random choice between the four given values
  • .choose(choices: int[]): int: Makes a random choice from the given values

Area

Areas 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

Month Enum

If you didn’t know, there are 12 months. Each month has values for

  • The Northern hemisphere temperature modifier, in the range [-1, 1]
  • The season

  • january; ordinal 0
    • Modifier: -1
    • Season: winter
  • february; ordinal 1
    • Modifier: -0.866
    • Season: winter
  • march; ordinal 2
    • Modifier” -0.5
    • Season: spring
  • april; ordinal 3
    • Modifier: 0
    • Season: spring
  • may; ordinal 4
    • Modifier: 0.5
    • Season: spring
  • june; ordinal 5
    • Modifier: 0.866
    • Season: summer
  • july; ordinal 6
    • Modifier: 1
    • Season: summer
  • august; ordinal 7
    • Modifier: 0.866
    • Season: summer
  • september; ordinal 8
    • Modifier: 0.5
    • Season: fall
  • october; ordinal 9
    • Modifier: 0
    • Season: fall
  • november; ordinal 10
    • Modifier: -0.5
    • Season: fall
  • december; ordinal 11
    • Modifier: -0.866
    • Season: fall

Noise2D

Noise2D is a functional interface which serves as a wrapper for a 2D noise layer. It can be created in scripts as a callback with the params:

  • x: number: The x coordinate being queried
  • z: number: The z coordinate being queried
  • return: number: The value at the queried position

Noise2D objects can be created from several methods in the noise sub-binding. Instances of Noise2D also have several methods available

  • : Gets the value of the noise the given position
  • : Applies an octave function to the noise, overlaying weaker, more spread copies of the noise on top of itself
    • octaves: int: The number of octaves to overlay
  • : 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 rounding the value to the nearest level. Expects the noise’s value to be in the range [-1, 1]
    • levels: int: The number of levels to round to
  • : Scales the input coordinates of the noise function by the given scale factor
  • : Re-scales the noise value to the new range, old values are expected to be in the range [-1, 1]
  • : Re-scales the noise value from the old range to the new range
  • : Scales then shifts the noise value
    • scale: number: The factor to multiply the noise value by
    • shift: number: The amount to add to the scaled value
  • : .scaled(number,number) but also clamping the noise value to the min and max values
  • : .scaled(number,number,number,number), but clamping the noise value to the min and max values
  • : Uses the FastNoiseLite of the simplex noise to warp the domain of the noise
  • : Clamps the noise to the given range
  • : Sums this noise with the other
  • : Adds a constant value to the noise
  • : Takes the minimum value of this noise and the other
  • : Takes the maximum value of this noise and the other
  • : Multiplies this noise with the other
  • : Maps the output of the noise using the given function
  • : Creates varying-height cliffs
    • compare: Noise2D: The noise to compare to, cliffs will be added when the noise is greater than the compare value
    • addend: Noise2D: The cliff noise to add
  • : Creates caring-height cliffs with slopes
    • compareNoise: Noise2D: The noise to compare to, cliffs will be added when sum of the noise and the addend is greater than the compare value
    • addendNoise: Noise2D: The cliff noise to add
    • slopeNoise: Noise2D: The slope noise to use
  • : Stretches the z coordinate by the given factor
  • : Stretches the x coordinate by the given factor
  • : Swaps the x and z coordinates
  • : Rotates the coordinate grid around the origin by the given angle, in degrees
  • : Evaluates the noise at the corners of the chunk and returns them as a LerpFloatLayer
  • : Evaluates the noise at the corners of the grid coordinate and returns them as a LerpFloatLayer

Noise3D

Noise3D is a functional interface which serves as a wrapper for a 3D noise layer. It can be created in scripts as a callback with the params:

  • x: number: The x coordinate being queried
  • y: number: The y coordinate being queried
  • z: number: The z coordinate being queried
  • return: number: The value at the queried position

Noise3D objects can be created from several methods in the noise sub-binding. instances of Nosie3D also have several methods available

  • : Gets the value of the noise at the given position
  • : Applies an octave function to the noise, overlaying weaker, more spread copies of the noise on top of itself
    • octaves: int: The number of octaves to overlay
  • : Scales the input coordinates of the noise function by the given scale factor
  • : Re-scales the noise values to the new range, old values are expected to be in the range [-1, 1]
  • : Re-scaled the noise value from the old range to the new range
  • : Uses the FastNoiseLite of the simplex noise to warp the domain of the noise
  • : Swaps the x and z coordinates
  • : Swaps the x and y coordinates
  • : Swaps the y and z coordinates
  • : Dissolves the noise to a Noise2D using the given Noise2D’s as the y coordinate at each point
  • : Rotates the coordinate grid around the x-axis by the given angle, in degrees
  • : Rotates the coordinate grid around the y-axis by the given angle, in degrees
  • : Rotates the coordinate grid around the z-axis by the given angle, in degrees