Class BlockAgeProcessor
java.lang.Object
net.minecraft.world.level.levelgen.structure.templatesystem.BlockAgeProcessor
- All Implemented Interfaces:
StructureProcessor
-
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 TypeMethodDescriptioncom.mojang.serialization.MapCodec<BlockAgeProcessor> codec()private static BlockStategetRandomBlock(RandomSource random, BlockState[] blocks) private BlockStategetRandomBlock(RandomSource random, BlockState[] nonMossyBlocks, BlockState[] mossyBlocks) private static BlockStategetRandomFacingStairs(RandomSource random, Block stairBlock) 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) processBlock(LevelReader level, BlockPos targetPosition, BlockPos referencePos, BlockPos templateRelativePos, StructureTemplate.StructureBlockInfo processedBlockInfo, StructurePlaceSettings settings) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface StructureProcessor
evaluatesEntirePieceState, finalizeProcessing, process, processEntity
-
Field Details
-
MAP_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, BlockPos templateRelativePos, StructureTemplate.StructureBlockInfo processedBlockInfo, StructurePlaceSettings settings) - Specified by:
processBlockin interfaceStructureProcessor
-
maybeReplaceFullStoneBlock
-
maybeReplaceStairs
-
maybeReplaceSlab
-
maybeReplaceWall
-
maybeReplaceObsidian
-
getRandomFacingStairs
-
getRandomBlock
private BlockState getRandomBlock(RandomSource random, BlockState[] nonMossyBlocks, BlockState[] mossyBlocks) -
getRandomBlock
-
codec
- Specified by:
codecin interfaceStructureProcessor
-