Guest User

Untitled

a guest
Oct 3rd, 2020
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.17 KB | None | 0 0
  1. package com.squrikle.bountifulbiomes.world.feature;
  2.  
  3. import java.util.Random;
  4.  
  5. import com.squrikle.bountifulbiomes.init.BlockInitNew;
  6.  
  7. import net.minecraft.block.trees.Tree;
  8. import net.minecraft.world.gen.blockstateprovider.SimpleBlockStateProvider;
  9. import net.minecraft.world.gen.feature.ConfiguredFeature;
  10. import net.minecraft.world.gen.feature.Feature;
  11. import net.minecraft.world.gen.feature.TreeFeatureConfig;
  12. import net.minecraft.world.gen.foliageplacer.SpruceFoliagePlacer;
  13. import net.minecraftforge.common.IPlantable;
  14.  
  15. public class CedarTree extends Tree {
  16.  
  17.     public static final TreeFeatureConfig CEDAR_TREE_CONFIG = (new TreeFeatureConfig.Builder(
  18.             new SimpleBlockStateProvider(BlockInitNew.CEDAR_LOG.get().getDefaultState()),
  19.             new SimpleBlockStateProvider(BlockInitNew.CEDAR_LEAVES.get().getDefaultState()),
  20.             new SpruceFoliagePlacer(5, 0))).baseHeight(4).heightRandA(5).foliageHeight(5).ignoreVines()
  21.                 .setSapling((IPlantable)BlockInitNew.CEDAR_SAPLING.get()).build();
  22.  
  23.     @Override
  24.     protected ConfiguredFeature<TreeFeatureConfig, ?> getTreeFeature(Random randomIn, boolean b) {
  25.         return Feature.NORMAL_TREE.withConfiguration(CEDAR_TREE_CONFIG);
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment