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 float
private static final BlockState[]
private static final float
private static final float
private static final float
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static BlockState
getRandomBlock
(RandomSource random, BlockState[] states) private BlockState
getRandomBlock
(RandomSource random, BlockState[] normalStates, BlockState[] mossyStates) private static BlockState
getRandomFacingStairs
(RandomSource random, Block stairsBlock) protected StructureProcessorType
<?> getType()
private BlockState
private BlockState
maybeReplaceObsidian
(RandomSource random) private BlockState
maybeReplaceSlab
(RandomSource random) private BlockState
maybeReplaceStairs
(RandomSource random, BlockState state) private BlockState
maybeReplaceWall
(RandomSource random) processBlock
(LevelReader level, BlockPos offset, BlockPos pos, StructureTemplate.StructureBlockInfo blockInfo, StructureTemplate.StructureBlockInfo relativeBlockInfo, StructurePlaceSettings settings) Methods inherited from class net.minecraft.world.level.levelgen.structure.templatesystem.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
@Nullable public StructureTemplate.StructureBlockInfo processBlock(LevelReader level, BlockPos offset, BlockPos pos, StructureTemplate.StructureBlockInfo blockInfo, StructureTemplate.StructureBlockInfo relativeBlockInfo, StructurePlaceSettings settings) - Overrides:
processBlock
in classStructureProcessor
-
maybeReplaceFullStoneBlock
-
maybeReplaceStairs
-
maybeReplaceSlab
-
maybeReplaceWall
-
maybeReplaceObsidian
-
getRandomFacingStairs
-
getRandomBlock
private BlockState getRandomBlock(RandomSource random, BlockState[] normalStates, BlockState[] mossyStates) -
getRandomBlock
-
getType
- Specified by:
getType
in classStructureProcessor
-