Package net.minecraft.world.gen.tree
Class TreeDecorator
java.lang.Object
net.minecraft.world.gen.tree.TreeDecorator
- Direct Known Subclasses:
AlterGroundTreeDecorator
,BeehiveTreeDecorator
,CocoaBeansTreeDecorator
,LeaveVineTreeDecorator
,TrunkVineTreeDecorator
public abstract class TreeDecorator extends Object
Tree decorators can add additional blocks to trees, such as vines or beehives.
-
Field Summary
Fields Modifier and Type Field Description static com.mojang.serialization.Codec<TreeDecorator>
TYPE_CODEC
-
Constructor Summary
Constructors Constructor Description TreeDecorator()
-
Method Summary
Modifier and Type Method Description abstract void
generate(StructureWorldAccess world, Random random, List<BlockPos> logPositions, List<BlockPos> leavesPositions, Set<BlockPos> placedStates, BlockBox box)
protected abstract TreeDecoratorType<?>
getType()
protected void
placeVine(ModifiableWorld world, BlockPos pos, BooleanProperty directionProperty, Set<BlockPos> placedStates, BlockBox box)
protected void
setBlockStateAndEncompassPosition(ModifiableWorld world, BlockPos pos, BlockState state, Set<BlockPos> placedStates, BlockBox box)
-
Field Details
-
TYPE_CODEC
-
-
Constructor Details
-
TreeDecorator
public TreeDecorator()
-
-
Method Details
-
getType
-
generate
-
placeVine
protected void placeVine(ModifiableWorld world, BlockPos pos, BooleanProperty directionProperty, Set<BlockPos> placedStates, BlockBox box) -
setBlockStateAndEncompassPosition
protected void setBlockStateAndEncompassPosition(ModifiableWorld world, BlockPos pos, BlockState state, Set<BlockPos> placedStates, BlockBox box)
-