Class BlockAgeProcessor
java.lang.Object
net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessor
net.minecraft.world.level.levelgen.structure.templatesystem.BlockAgeProcessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<BlockAgeProcessor> private final floatprivate static final BlockState[]private static final floatprivate static final floatprivate static final float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static BlockStategetRandomBlock(RandomSource random, BlockState[] blocks) private BlockStategetRandomBlock(RandomSource random, BlockState[] nonMossyBlocks, BlockState[] mossyBlocks) private static BlockStategetRandomFacingStairs(RandomSource random, Block stairBlock) protected StructureProcessorType<?> getType()private @Nullable BlockStateprivate @Nullable BlockStatemaybeReplaceObsidian(RandomSource random) private @Nullable BlockStatemaybeReplaceSlab(BlockState blockState, RandomSource random) private @Nullable BlockStatemaybeReplaceStairs(BlockState blockState, RandomSource random) private @Nullable BlockStatemaybeReplaceWall(BlockState blockState, RandomSource random) @Nullable StructureTemplate.StructureBlockInfoprocessBlock(LevelReader level, BlockPos targetPosition, BlockPos referencePos, StructureTemplate.StructureBlockInfo originalBlockInfo, StructureTemplate.StructureBlockInfo processedBlockInfo, StructurePlaceSettings settings) Methods inherited from class StructureProcessor
finalizeProcessing, process, processEntity
-
Field Details
-
CODEC
-
PROBABILITY_OF_REPLACING_FULL_BLOCK
private static final float PROBABILITY_OF_REPLACING_FULL_BLOCK- See Also:
-
PROBABILITY_OF_REPLACING_STAIRS
private static final float PROBABILITY_OF_REPLACING_STAIRS- See Also:
-
PROBABILITY_OF_REPLACING_OBSIDIAN
private static final float PROBABILITY_OF_REPLACING_OBSIDIAN- See Also:
-
NON_MOSSY_REPLACEMENTS
-
mossiness
private final float mossiness
-
-
Constructor Details
-
BlockAgeProcessor
public BlockAgeProcessor(float mossiness)
-
-
Method Details
-
processBlock
public @Nullable StructureTemplate.StructureBlockInfo processBlock(LevelReader level, BlockPos targetPosition, BlockPos referencePos, StructureTemplate.StructureBlockInfo originalBlockInfo, StructureTemplate.StructureBlockInfo processedBlockInfo, StructurePlaceSettings settings) - Overrides:
processBlockin classStructureProcessor
-
maybeReplaceFullStoneBlock
-
maybeReplaceStairs
-
maybeReplaceSlab
-
maybeReplaceWall
-
maybeReplaceObsidian
-
getRandomFacingStairs
-
getRandomBlock
private BlockState getRandomBlock(RandomSource random, BlockState[] nonMossyBlocks, BlockState[] mossyBlocks) -
getRandomBlock
-
getType
- Specified by:
getTypein classStructureProcessor
-