Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RegistryHandler
- public static final RegistryObject<Block> LAVENDER_SAPLING = BLOCKS.register("lavender_sapling", () -> new ModSapling(new LavenderTree(), Block.Properties.create(Material.PLANTS).doesNotBlockMovement().tickRandomly().hardnessAndResistance(0).sound(SoundType.PLANT)));
- public static final RegistryObject<Item> LAVENDER_SAPLING_ITEM = ITEMS.register("lavender_sapling", () -> new BlockItemBase(LAVENDER_SAPLING.get()));
- =====================================================================================================================
- LavenderTree
- public class LavenderTree extends Tree {
- public static final TreeFeatureConfig LAVENDER_TREE_CONFIG = (new TreeFeatureConfig.Builder(new SimpleBlockStateProvider(RegistryHandler.LAVENDER_LOG.get().getDefaultState()), new SimpleBlockStateProvider(RegistryHandler.LAVENDER_LEAVES.get().getDefaultState()), new BlobFoliagePlacer(2, 0))).baseHeight(5).heightRandA(2).foliageHeight(3).ignoreVines().setSapling((net.minecraftforge.common.IPlantable) RegistryHandler.LAVENDER_SAPLING.get().getDefaultState()).build();
- @Override
- protected ConfiguredFeature<TreeFeatureConfig, ?> getTreeFeature(Random randomIn, boolean p_225546_2_) {
- return Feature.NORMAL_TREE.withConfiguration(LAVENDER_TREE_CONFIG);
- }
- }
- =====================================================================================================================
- LavenderMeadowBiome
- this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.NORMAL_TREE.withConfiguration(LavenderTree.LAVENDER_TREE_CONFIG).withPlacement(Placement.COUNT_EXTRA_HEIGHTMAP.configure(new AtSurfaceWithExtraConfig(5, 0.1F, 1))));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement