actually read the vanilla code? test in morning

This commit is contained in:
gamma-delta 2022-04-02 01:09:01 -05:00
parent cce9b3c4a1
commit 3599c36fa3

View file

@ -5,18 +5,18 @@ import at.petrak.hexcasting.common.blocks.HexBlocks;
import net.minecraft.core.Holder;
import net.minecraft.data.worldgen.features.FeatureUtils;
import net.minecraft.util.valueproviders.ConstantInt;
import net.minecraft.util.valueproviders.UniformInt;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.grower.AbstractTreeGrower;
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
import net.minecraft.world.level.levelgen.feature.Feature;
import net.minecraft.world.level.levelgen.feature.configurations.TreeConfiguration;
import net.minecraft.world.level.levelgen.feature.featuresize.TwoLayersFeatureSize;
import net.minecraft.world.level.levelgen.feature.foliageplacers.PineFoliagePlacer;
import net.minecraft.world.level.levelgen.feature.foliageplacers.FancyFoliagePlacer;
import net.minecraft.world.level.levelgen.feature.stateproviders.BlockStateProvider;
import net.minecraft.world.level.levelgen.feature.trunkplacers.FancyTrunkPlacer;
import org.jetbrains.annotations.Nullable;
import java.util.OptionalInt;
import java.util.Random;
public class AkashicTreeGrower extends AbstractTreeGrower {
@ -36,11 +36,12 @@ public class AkashicTreeGrower extends AbstractTreeGrower {
new TreeConfiguration.TreeConfigurationBuilder(
BlockStateProvider.simple(HexBlocks.AKASHIC_LOG.get()),
// baseHeight, heightRandA, heightRandB
new FancyTrunkPlacer(8, 4, 5),
new FancyTrunkPlacer(8, 9, 11),
BlockStateProvider.simple(leaves[i]),
// radius, offset, height
new PineFoliagePlacer(ConstantInt.of(2), ConstantInt.of(5), UniformInt.of(6, 8)),
new TwoLayersFeatureSize(1, 1, 1)
new FancyFoliagePlacer(ConstantInt.of(2), ConstantInt.of(5), 7),
// limit, lower size, upper size, minclippedheight
new TwoLayersFeatureSize(0, 0, 0, OptionalInt.of(6))
).build());
}
}