Class TreeFeature
java.lang.Object
net.minecraftforge.registries.ForgeRegistryEntry<Feature<?>>
net.minecraft.world.level.levelgen.feature.Feature<TreeConfiguration>
net.minecraft.world.level.levelgen.feature.TreeFeature
- All Implemented Interfaces:
IForgeRegistryEntry<Feature<?>>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
Field Summary
Fields inherited from class net.minecraft.world.level.levelgen.feature.Feature
BAMBOO, BASALT_COLUMNS, BASALT_PILLAR, BLOCK_PILE, BLUE_ICE, BONUS_CHEST, CHORUS_PLANT, CORAL_CLAW, CORAL_MUSHROOM, CORAL_TREE, DECORATED, DELTA_FEATURE, DESERT_WELL, DISK, DRIPSTONE_CLUSTER, END_GATEWAY, END_ISLAND, END_SPIKE, FILL_LAYER, FLOWER, FOREST_ROCK, FOSSIL, FREEZE_TOP_LAYER, GEODE, GLOW_LICHEN, GLOWSTONE_BLOB, GROWING_PLANT, HUGE_BROWN_MUSHROOM, HUGE_FUNGUS, HUGE_RED_MUSHROOM, ICE_PATCH, ICE_SPIKE, ICEBERG, KELP, LAKE, LARGE_DRIPSTONE, MONSTER_ROOM, NETHER_FOREST_VEGETATION, NO_BONEMEAL_FLOWER, NO_OP, ORE, RANDOM_BOOLEAN_SELECTOR, RANDOM_PATCH, RANDOM_SELECTOR, REPLACE_BLOBS, REPLACE_SINGLE_BLOCK, ROOT_SYSTEM, SCATTERED_ORE, SEA_PICKLE, SEAGRASS, SIMPLE_BLOCK, SIMPLE_RANDOM_SELECTOR, SMALL_DRIPSTONE, SPRING, TREE, TWISTING_VINES, UNDERWATER_MAGMA, VEGETATION_PATCH, VINES, VOID_START_PLATFORM, WATERLOGGED_VEGETATION_PATCH, WEEPING_VINES
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
doPlace(WorldGenLevel p_160511_, Random p_160512_, BlockPos p_160513_, BiConsumer<BlockPos,BlockState> p_160514_, BiConsumer<BlockPos,BlockState> p_160515_, TreeConfiguration p_160516_)
private int
getMaxFreeTreeHeight(LevelSimulatedReader p_67216_, int p_67217_, BlockPos p_67218_, TreeConfiguration p_67219_)
static boolean
isAirOrLeaves(LevelSimulatedReader p_67268_, BlockPos p_67269_)
private static boolean
isBlockWater(LevelSimulatedReader p_67283_, BlockPos p_67284_)
static boolean
isFree(LevelSimulatedReader p_67263_, BlockPos p_67264_)
private static boolean
isReplaceablePlant(LevelSimulatedReader p_67289_, BlockPos p_67290_)
private static boolean
isVine(LevelSimulatedReader p_67278_, BlockPos p_67279_)
boolean
place(FeaturePlaceContext<TreeConfiguration> p_160530_)
protected void
setBlock(LevelWriter p_67221_, BlockPos p_67222_, BlockState p_67223_)
private static void
setBlockKnownShape(LevelWriter p_67257_, BlockPos p_67258_, BlockState p_67259_)
private static DiscreteVoxelShape
updateLeaves(LevelAccessor p_67203_, BoundingBox p_67204_, Set<BlockPos> p_67205_, Set<BlockPos> p_67206_)
static boolean
validTreePos(LevelSimulatedReader p_67273_, BlockPos p_67274_)
Methods inherited from class net.minecraft.world.level.levelgen.feature.Feature
checkNeighbors, configured, configuredCodec, isAdjacentToAir, isAir, isDirt, isGrassOrDirt, isReplaceable, isStone, markAboveForPostProcessing, safeSetBlock
Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
-
Field Details
-
BLOCK_UPDATE_FLAGS
private static final int BLOCK_UPDATE_FLAGS- See Also:
- Constant Field Values
-
-
Constructor Details
-
TreeFeature
-
-
Method Details
-
isFree
-
isVine
-
isBlockWater
-
isAirOrLeaves
-
isReplaceablePlant
-
setBlockKnownShape
private static void setBlockKnownShape(LevelWriter p_67257_, BlockPos p_67258_, BlockState p_67259_) -
validTreePos
-
doPlace
private boolean doPlace(WorldGenLevel p_160511_, Random p_160512_, BlockPos p_160513_, BiConsumer<BlockPos,BlockState> p_160514_, BiConsumer<BlockPos,BlockState> p_160515_, TreeConfiguration p_160516_) -
getMaxFreeTreeHeight
private int getMaxFreeTreeHeight(LevelSimulatedReader p_67216_, int p_67217_, BlockPos p_67218_, TreeConfiguration p_67219_) -
setBlock
- Overrides:
setBlock
in classFeature<TreeConfiguration>
-
place
- Specified by:
place
in classFeature<TreeConfiguration>
-
updateLeaves
private static DiscreteVoxelShape updateLeaves(LevelAccessor p_67203_, BoundingBox p_67204_, Set<BlockPos> p_67205_, Set<BlockPos> p_67206_)
-