Posted January 3, 20214 yr I'm trying to make a berry bush that generates in forests and plains (more common in forests), and now it doesn't generate at all. Here's the code: package com.pickleface.lifecraft.world.gen; import com.google.common.collect.ImmutableSet; import com.pickleface.lifecraft.LifeCraft; import com.pickleface.lifecraft.blocks.BlueberryBush; import com.pickleface.lifecraft.util.Registry; import net.minecraft.block.Blocks; import net.minecraft.world.biome.Biome; import net.minecraft.world.gen.GenerationStage; import net.minecraft.world.gen.blockplacer.SimpleBlockPlacer; import net.minecraft.world.gen.blockstateprovider.SimpleBlockStateProvider; import net.minecraft.world.gen.feature.*; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.event.world.BiomeLoadingEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber(modid = LifeCraft.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT) public class VeganGen { @SubscribeEvent public static void generateBushes(BiomeLoadingEvent event) { BlockClusterFeatureConfig BLUEBERRY_BUSH_PATCH_CONFIG = (new BlockClusterFeatureConfig.Builder(new SimpleBlockStateProvider(Registry.BLUEBERRY_BUSH.get().getDefaultState().with(BlueberryBush.AGE, 3)), SimpleBlockPlacer.PLACER)).tries(64).whitelist(ImmutableSet.of(Blocks.GRASS_BLOCK.getDefaultState().getBlock())).func_227317_b_().build(); ConfiguredFeature<?, ?> PATCH_BLUEBERRY_BUSH = Feature.RANDOM_PATCH.withConfiguration(BLUEBERRY_BUSH_PATCH_CONFIG); ConfiguredFeature<?, ?> PATCH_BLUEBERRY_DECORATED = PATCH_BLUEBERRY_BUSH.withPlacement(Features.Placements.PATCH_PLACEMENT).chance(24); if (event.getCategory().getString().equals("forest")) { event.getGeneration().withFeature(GenerationStage.Decoration.VEGETAL_DECORATION, PATCH_BLUEBERRY_DECORATED); } else if (event.getCategory().getString().equals("plains")) { event.getGeneration().withFeature(GenerationStage.Decoration.VEGETAL_DECORATION, PATCH_BLUEBERRY_BUSH); } } } Any help is appreciated. Have some lorem ispum.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.