Block state provider

Helpers that build a minecraft:block_state_provider object, one for each of its types. Where a field takes one, write the helper's call; its name is the type it makes. Click a type to see what it accepts.

CopyProperties

CopyProperties
CopyProperties(source)
source
BlockStateProviderRef

DualNoise

DualNoise

Like Noise, with a second, slower noise that picks how many of states can appear in each area.

DualNoise(seed, noise, scale, variety, slow_noise, slow_scale, states)
seed
int
noise
NoiseParameters
scale
number 0..
variety
InclusiveRange of int 1..64
slow_noise
NoiseParameters
slow_scale
number 0..
states
list of BlockState

Noise

Noise

Picks from states by a noise, so the same block appears in patches.

Noise(seed, noise, scale, states)
seed
int

Seeds the noise.

noise
NoiseParameters
scale
number 0..

Scales x and z before sampling; smaller values give larger patches.

states
list of BlockState

The blocks to pick from.

NoiseThreshold

NoiseThreshold

Uses default_state where a noise is below threshold, and one of low_states or high_states above it. Vanilla flower forests use it.

NoiseThreshold(seed, noise, scale, threshold, high_chance, default_state, low_states, high_states)
seed
int
noise
NoiseParameters
scale
number 0..
threshold
number -1..1
high_chance
number 0..1
default_state
BlockState
low_states
list of BlockState
high_states
list of BlockState

RandomBlock

RandomBlock

Picks one of these blocks at random, each equally likely.

RandomBlock(blocks)
blocks
block id | #block tag | list of block ids

RandomizedInt

RandomizedInt

Another provider's block, with an integer property set at random, such as a flower's flower_amount.

RandomizedInt(property, values, source)
property
string

The property to set.

values
IntProvider of int

The values to pick from.

source
BlockStateProviderRef

The provider that picks the block.

Rotated

Rotated

A block with an axis property, turned to match the direction it is placed in, as logs are.

Rotated(state, direction?)
state
BlockStateProviderRef
directionoptional
Direction

RuleBased

RuleBased

Uses the first rule whose block predicate passes at the position, or fallback when none does.

RuleBased(rules, fallback?)
rules
list of { if_true: BlockPredicate, then: BlockStateProviderRef }
fallbackoptional
BlockStateProviderRef

Simple

Simple

Always the same block.

Simple(state)
state
BlockState

The block, with optional state such as oak_log[axis = y].

Weighted

Weighted

Picks a block at random, by weight.

Weighted(entries)
entries
NonEmptyWeightedList of BlockState