Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Commit

Permalink
Change tree 'look'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-E committed May 1, 2022
1 parent e0b5276 commit d483ad5
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
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.AcaciaFoliagePlacer;
import net.minecraft.world.level.levelgen.feature.foliageplacers.BlobFoliagePlacer;
import net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer;
import net.minecraft.world.level.levelgen.feature.stateproviders.BlockStateProvider;
import net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacer;
Expand Down Expand Up @@ -57,10 +57,10 @@ public static void initialize() {
// Setups the feature, how it places, what logs to use, what leaves to use, how it places those leaves etc.
RUBBER_TREE_CONFIGURED_FEATURE = FeatureUtils.register("rubber_tree", Feature.TREE, new TreeConfiguration.TreeConfigurationBuilder(
BlockStateProvider.simple(MyrtreesBlocks.RUBBERWOOD_LOG.get()),
new RubberwoodTreeTrunkPlacer(5, 2, 2),
new RubberwoodTreeTrunkPlacer(5, 3, 0),
BlockStateProvider.simple(MyrtreesBlocks.RUBBERWOOD_LEAVES.get()),
new AcaciaFoliagePlacer(ConstantInt.of(2), ConstantInt.of(0)),
new TwoLayersFeatureSize(1, 0, 2)
new BlobFoliagePlacer(ConstantInt.of(2), ConstantInt.of(0), 3),
new TwoLayersFeatureSize(1, 0, 1)
).ignoreVines().build());

// No clue, copied the Oak tree placement, defines how the placement in the world and a load of checking predicates
Expand Down Expand Up @@ -108,7 +108,6 @@ protected TrunkPlacerType<?> type() {
public List<FoliagePlacer.FoliageAttachment> placeTrunk(LevelSimulatedReader levelSimulatedRW, BiConsumer<BlockPos, BlockState> biConsumer, Random random, int i, BlockPos blockPos, TreeConfiguration treeConfiguration) {
setDirtAt(levelSimulatedRW, biConsumer, random, blockPos.below(), treeConfiguration);

System.out.println("Using");
for (int j = 0; j < i; ++j) {
if (j == 1) {
biConsumer.accept(blockPos.above(j), MyrtreesBlocks.FILLED_RUBBERWOOD_LOG.get().defaultBlockState());
Expand Down

0 comments on commit d483ad5

Please sign in to comment.