public class WeightedBlockStateProvider extends BlockStateProvider
Modifier and Type | Field and Description |
---|---|
static com.mojang.serialization.Codec<WeightedBlockStateProvider> |
CODEC |
private WeightedList<BlockState> |
states |
TYPE_CODEC
Modifier | Constructor and Description |
---|---|
|
WeightedBlockStateProvider() |
private |
WeightedBlockStateProvider(WeightedList<BlockState> states) |
Modifier and Type | Method and Description |
---|---|
WeightedBlockStateProvider |
addState(BlockState state,
int weight) |
BlockState |
getBlockState(Random random,
BlockPos pos) |
protected BlockStateProviderType<?> |
getType() |
private static com.mojang.serialization.DataResult<WeightedBlockStateProvider> |
wrap(WeightedList<BlockState> states) |
public static final com.mojang.serialization.Codec<WeightedBlockStateProvider> CODEC
private final WeightedList<BlockState> states
private WeightedBlockStateProvider(WeightedList<BlockState> states)
public WeightedBlockStateProvider()
private static com.mojang.serialization.DataResult<WeightedBlockStateProvider> wrap(WeightedList<BlockState> states)
protected BlockStateProviderType<?> getType()
getType
in class BlockStateProvider
public WeightedBlockStateProvider addState(BlockState state, int weight)
public BlockState getBlockState(Random random, BlockPos pos)
getBlockState
in class BlockStateProvider