Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.dreamlands.common.world.feature.tree;
- import com.dreamlands.common.block.DreamLeavesBlock;
- import com.mojang.serialization.Codec;
- import net.minecraft.core.BlockPos;
- import net.minecraft.core.Direction;
- import net.minecraft.tags.BlockTags;
- import net.minecraft.util.RandomSource;
- import net.minecraft.world.level.LevelAccessor;
- import net.minecraft.world.level.LevelSimulatedReader;
- import net.minecraft.world.level.WorldGenLevel;
- import net.minecraft.world.level.block.Blocks;
- import net.minecraft.world.level.block.RotatedPillarBlock;
- import net.minecraft.world.level.block.state.BlockState;
- import net.minecraft.world.level.levelgen.feature.Feature;
- import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
- /**
- * this is actually the worst code i have ever seen this needs to change ASAP, but it's the best tree shape i can have for now.
- */
- public class EvergreenTreeFeature extends Feature<DreamTreeConfiguration> {
- public EvergreenTreeFeature(Codec<DreamTreeConfiguration> codec) {
- super(codec);
- }
- @Override
- public boolean place(FeaturePlaceContext<DreamTreeConfiguration> context) {
- WorldGenLevel level = context.level();
- RandomSource random = context.random();
- BlockPos startPos = context.origin();
- DreamTreeConfiguration config = context.config();
- int trunkHeight = 25;
- BlockPos belowPos = startPos.below();
- level.setBlock(belowPos, Blocks.DIRT.defaultBlockState(), 2);
- BlockPos.MutableBlockPos mutablePos = new BlockPos.MutableBlockPos();
- for (int i = 0; i < trunkHeight; ++i) {
- this.placeLog(level, mutablePos.setWithOffset(startPos, 1, i, 0), random, config, Direction.Axis.Y);
- if (i < 9) {
- this.placeLog(level, mutablePos.setWithOffset(startPos, 0, i, 0), random, config, Direction.Axis.Y);
- this.placeLog(level, mutablePos.setWithOffset(startPos, 1, i, 1), random, config, Direction.Axis.Y);
- this.placeLog(level, mutablePos.setWithOffset(startPos, 0, i, 1), random, config, Direction.Axis.Y);
- }
- if (i == 6) {
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 5, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -5), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -3), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, 2, i, -2), random, config, Direction.Axis.X);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -5), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -4), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, 1, i, -2), random, config, Direction.Axis.Z);
- this.placeLog(level, mutablePos.setWithOffset(startPos, 1, i, -3), random, config, Direction.Axis.Z);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -2), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, 0, i, -1), random, config, Direction.Axis.Z);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 0), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, -1, i, 1), random, config, Direction.Axis.Z);
- this.placeLog(level, mutablePos.setWithOffset(startPos, -1, i, 2), random, config, Direction.Axis.Z);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 5), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 1), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, -2, i, 2), random, config, Direction.Axis.Z);
- this.placeLog(level, mutablePos.setWithOffset(startPos, -2, i, 3), random, config, Direction.Axis.Z);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 5), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -4, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -4, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -4, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -4, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -5, i, 2), random, config);
- }
- if (i == 7) {
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, 2), random, config);
- }
- if (i == 8) {
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 5), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -1), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, 1, i, 2), random, config, Direction.Axis.Z);
- this.placeLog(level, mutablePos.setWithOffset(startPos, 1, i, 3), random, config, Direction.Axis.Z);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 5), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 6), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 5), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 6), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, -2), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, -1, i, -1), random, config, Direction.Axis.Z);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, -4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, -3), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, -2, i, -2), random, config, Direction.Axis.Z);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, -4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -4, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -4, i, -1), random, config);
- }
- if (i == 9) {
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 6, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 6, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 5, i, -4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 5, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 5, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 5, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 5, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 5, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 5, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 5, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, -4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -3), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, 3, i, -2), random, config, Direction.Axis.X);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -2), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, 2, i, -1), random, config, Direction.Axis.X);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 5), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, -2), random, config);
- }
- if (i == 10) {
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 5, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 0), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, 0, i, 1), random, config, Direction.Axis.X);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 0), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, -1, i, 1), random, config, Direction.Axis.X);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 1), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, -2, i, 2), random, config, Direction.Axis.X);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -4, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -4, i, 3), random, config);
- }
- if (i == 11) {
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 5), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 5), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -5), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -2), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, 0, i, -1), random, config, Direction.Axis.X);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, -2), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, -1, i, -1), random, config, Direction.Axis.X);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, 2), random, config);
- }
- if (i == 12) {
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 5, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 5, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, -1), random, config);
- }
- if (i == 13) {
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 5, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 5, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 5), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 5), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -3, i, 3), random, config);
- }
- if (i == 14) {
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -4), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 2), random, config);
- }
- if (i == 15) {
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 5, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -1), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, 1, i, 1), random, config, Direction.Axis.Z);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 0), random, config);
- }
- if (i == 16) {
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 0), random, config);
- }
- if (i == 17) {
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -1), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, 1, i, 1), random, config, Direction.Axis.Z);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -2, i, 0), random, config);
- }
- if (i == 18) {
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 4, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 3), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 1), random, config);
- }
- if (i == 19) {
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -1), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, 1, i, 1), random, config, Direction.Axis.Z);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 0), random, config);
- }
- if (i == 20) {
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 0), random, config);
- }
- if (i == 21) {
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 3, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -1), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, 2, i, 0), random, config, Direction.Axis.X);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, -1), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, 0, i, 0), random, config, Direction.Axis.X);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, -1, i, 1), random, config);
- }
- if (i == 22) {
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 0), random, config);
- }
- if (i == 23) {
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -1), random, config);
- this.placeLog(level, mutablePos.setWithOffset(startPos, 1, i, 1), random, config, Direction.Axis.Z);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 2), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 1), random, config);
- }
- if (i == 24) {
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, -1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 0, i, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 2, i + 1, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i + 1, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i + 1, 1), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i + 1, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i + 2, 0), random, config);
- this.placeLeaves(level, mutablePos.setWithOffset(startPos, 1, i + 3, 0), random, config);
- }
- }
- return true;
- }
- private void placeLog(LevelAccessor level, BlockPos pos, RandomSource random, DreamTreeConfiguration config, Direction.Axis axis) {
- level.setBlock(pos, config.trunkProvider.getState(random, pos).setValue(RotatedPillarBlock.AXIS, axis), 2);
- }
- private void placeLeaves(LevelAccessor level, BlockPos pos, RandomSource random, DreamTreeConfiguration config) {
- BlockState state = level.getBlockState(pos);
- if (state.canBeReplaced() || state.isAir()) {
- level.setBlock(pos, config.foliageProvider.getState(random, pos).setValue(DreamLeavesBlock.DISTANCE, 1), 2);
- }
- }
- private static boolean isReplaceable(LevelSimulatedReader level, BlockPos pos) {
- return level.isStateAtPosition(pos, EvergreenTreeFeature::isReplaceableBlock);
- }
- private static boolean isReplaceableBlock(BlockState state) {
- return state.is(BlockTags.REPLACEABLE_BY_TREES);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement