Package net.minecraft.world.gen.feature
Class TreeFeature
java.lang.Object
net.minecraft.world.gen.feature.Feature<TreeFeatureConfig>
net.minecraft.world.gen.feature.TreeFeature
public class TreeFeature extends Feature<TreeFeatureConfig>
-
Field Summary
Fields inherited from class net.minecraft.world.gen.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, EMERALD_ORE, END_GATEWAY, END_ISLAND, END_SPIKE, FILL_LAYER, FLOWER, FOREST_ROCK, FOSSIL, FREEZE_TOP_LAYER, GEODE, GLOWSTONE_BLOB, HUGE_BROWN_MUSHROOM, HUGE_FUNGUS, HUGE_RED_MUSHROOM, ICE_PATCH, ICE_SPIKE, ICEBERG, KELP, LAKE, LARGE_DRIPSTONE, MONSTER_ROOM, NETHER_FOREST_VEGETATION, NETHERRACK_REPLACE_BLOBS, NO_BONEMEAL_FLOWER, NO_OP, NO_SURFACE_ORE, ORE, RANDOM_BOOLEAN_SELECTOR, RANDOM_PATCH, RANDOM_SELECTOR, SEA_PICKLE, SEAGRASS, SIMPLE_BLOCK, SIMPLE_RANDOM_SELECTOR, SMALL_DRIPSTONE, SPRING_FEATURE, TREE, TWISTING_VINES, VINES, VOID_START_PLATFORM, WEEPING_VINES -
Constructor Summary
Constructors Constructor Description TreeFeature(com.mojang.serialization.Codec<TreeFeatureConfig> configCodec) -
Method Summary
Modifier and Type Method Description private static booleancanPlaceTreeOn(TestableWorld world, BlockPos pos)static booleancanReplace(TestableWorld world, BlockPos pos)static booleancanTreeReplace(TestableWorld world, BlockPos pos)private booleangenerate(StructureWorldAccess world, Random random, BlockPos pos, Set<BlockPos> logPositions, Set<BlockPos> leavesPositions, BlockBox box, TreeFeatureConfig config)booleangenerate(StructureWorldAccess structureWorldAccess, ChunkGenerator chunkGenerator, Random random, BlockPos blockPos, TreeFeatureConfig treeFeatureConfig)private intgetTopPosition(TestableWorld world, int height, BlockPos pos, TreeFeatureConfig config)static booleanisAirOrLeaves(TestableWorld world, BlockPos pos)private static booleanisReplaceablePlant(TestableWorld world, BlockPos pos)private static booleanisVine(TestableWorld world, BlockPos pos)private static booleanisWater(TestableWorld world, BlockPos pos)private VoxelSetplaceLogsAndLeaves(WorldAccess world, BlockBox box, Set<BlockPos> logs, Set<BlockPos> leaves)protected voidsetBlockState(ModifiableWorld world, BlockPos pos, BlockState state)static voidsetBlockStateWithoutUpdatingNeighbors(ModifiableWorld world, BlockPos pos, BlockState state)
-
Constructor Details
-
TreeFeature
-
-
Method Details
-
canTreeReplace
-
isVine
-
isWater
-
isAirOrLeaves
-
canPlaceTreeOn
-
isReplaceablePlant
-
setBlockStateWithoutUpdatingNeighbors
public static void setBlockStateWithoutUpdatingNeighbors(ModifiableWorld world, BlockPos pos, BlockState state) -
canReplace
-
generate
private boolean generate(StructureWorldAccess world, Random random, BlockPos pos, Set<BlockPos> logPositions, Set<BlockPos> leavesPositions, BlockBox box, TreeFeatureConfig config) -
getTopPosition
private int getTopPosition(TestableWorld world, int height, BlockPos pos, TreeFeatureConfig config) -
setBlockState
- Overrides:
setBlockStatein classFeature<TreeFeatureConfig>
-
generate
public final boolean generate(StructureWorldAccess structureWorldAccess, ChunkGenerator chunkGenerator, Random random, BlockPos blockPos, TreeFeatureConfig treeFeatureConfig)- Specified by:
generatein classFeature<TreeFeatureConfig>
-
placeLogsAndLeaves
-