public class LargeOakTreeFeature extends AbstractTreeFeature<BranchedTreeFeatureConfig>
Modifier and Type | Class and Description |
---|---|
(package private) static class |
LargeOakTreeFeature.BranchPos |
BAMBOO, BASALT_COLUMNS, BASALT_PILLAR, BASTION_REMNANT, BLOCK_PILE, BLUE_ICE, BONUS_CHEST, BURIED_TREASURE, CHORUS_PLANT, CORAL_CLAW, CORAL_MUSHROOM, CORAL_TREE, DARK_OAK_TREE, DECORATED, DECORATED_FLOWER, DELTA_FEATURE, DESERT_PYRAMID, DESERT_WELL, DISK, EMERALD_ORE, END_CITY, END_GATEWAY, END_ISLAND, END_SPIKE, FANCY_TREE, FILL_LAYER, FLOWER, FOREST_ROCK, FOSSIL, FREEZE_TOP_LAYER, GLOWSTONE_BLOB, HUGE_BROWN_MUSHROOM, HUGE_FUNGUS, HUGE_RED_MUSHROOM, ICE_PATCH, ICE_SPIKE, ICEBERG, IGLOO, JIGSAW_STRUCTURES, JUNGLE_GROUND_BUSH, JUNGLE_TEMPLE, KELP, LAKE, MEGA_JUNGLE_TREE, MEGA_SPRUCE_TREE, MINESHAFT, MONSTER_ROOM, NETHER_BRIDGE, NETHER_FOREST_VEGETATION, NETHER_FOSSIL, NETHERRACK_REPLACE_BLOBS, NO_OP, NO_SURFACE_ORE, NORMAL_TREE, OCEAN_MONUMENT, OCEAN_RUIN, ORE, PILLAGER_OUTPOST, RANDOM_BOOLEAN_SELECTOR, RANDOM_PATCH, RANDOM_RANDOM_SELECTOR, RANDOM_SELECTOR, RUINED_PORTAL, SEA_PICKLE, SEAGRASS, SHIPWRECK, SIMPLE_BLOCK, SIMPLE_RANDOM_SELECTOR, SPRING_FEATURE, STRONGHOLD, STRUCTURES, SWAMP_HUT, TWISTING_VINES, VILLAGE, VINES, VOID_START_PLATFORM, WEEPING_VINES, WOODLAND_MANSION
Constructor and Description |
---|
LargeOakTreeFeature(Function<com.mojang.datafixers.Dynamic<?>,? extends BranchedTreeFeatureConfig> configDeserializer) |
canTreeReplace, generate, isAir, isAirOrLeaves, isDirtOrGrass, isNaturalDirt, isNaturalDirtOrGrass, isReplaceablePlant, isVine, isWater, setBlockState, setBlockState, setLeavesBlockState, setLogBlockState, setToDirt
configure, deserializeConfig, getCreatureSpawns, getMonsterSpawns, isDirt, isStone
public LargeOakTreeFeature(Function<com.mojang.datafixers.Dynamic<?>,? extends BranchedTreeFeatureConfig> configDeserializer)
private float getBaseBranchSize(int treeHeight, int branchCount)
private float getLeafRadiusForLayer(int int2)
private int makeOrCheckBranch(ModifiableTestableWorld world, Random random, BlockPos start, BlockPos end, boolean make, Set<BlockPos> logs, BlockBox blockBox, BranchedTreeFeatureConfig config)
private int getLongestSide(BlockPos box)
private Direction.Axis getLogAxis(BlockPos branchStart, BlockPos branchEnd)
private void makeLeaves(ModifiableTestableWorld modifiableTestableWorld, Random random, int int2, BlockPos pos, List<LargeOakTreeFeature.BranchPos> list, Set<BlockPos> set, BlockBox box, BranchedTreeFeatureConfig config)
private boolean isHighEnough(int treeHeight, int height)
private void makeTrunk(ModifiableTestableWorld world, Random random, BlockPos pos, int height, Set<BlockPos> set, BlockBox box, BranchedTreeFeatureConfig config)
private void makeBranches(ModifiableTestableWorld world, Random random, int treeHeight, BlockPos treePosition, List<LargeOakTreeFeature.BranchPos> branchPositions, Set<BlockPos> set, BlockBox box, BranchedTreeFeatureConfig config)
public boolean generate(ModifiableTestableWorld modifiableTestableWorld, Random random, BlockPos blockPos, Set<BlockPos> set, Set<BlockPos> set2, BlockBox blockBox, BranchedTreeFeatureConfig branchedTreeFeatureConfig)
generate
in class AbstractTreeFeature<BranchedTreeFeatureConfig>
private int getTreeHeight(ModifiableTestableWorld world, Random random, BlockPos pos, int height, Set<BlockPos> logs, BlockBox box, BranchedTreeFeatureConfig config)