Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

OhWhoah

Members
  • Joined

  • Last visited

  1. Hi, I have a custom bush block that I made, and I am able to get it to generate normally in the overworld. I have since made another similar bush block, but I want this one to be able to gen only on soul soil in the soul sand valley biomes. Here is my code, I am not sure why it is not working, it isn't generating in the soul sand valley. //In class BlockInit public static final RegistryObject<BushBlock> SOULBERRY_BUSH = BLOCKS.register("soulberry_bush", () -> new CustomBush(PropertyInit.SOULBERRY_BUSH_PROPERTY)); //In Class PropertyInit public class PropertyInit { private PropertyInit() { } public final static BlockBehaviour.Properties CUSTOM_BUSH_PROPERTY = BlockBehaviour.Properties .of(Material.PLANT, MaterialColor.COLOR_GREEN).randomTicks().noCollission().instabreak() .sound(SoundType.SWEET_BERRY_BUSH); public final static BlockBehaviour.Properties SOULBERRY_BUSH_PROPERTY = BlockBehaviour.Properties .of(Material.REPLACEABLE_FIREPROOF_PLANT, MaterialColor.NETHER).randomTicks().noCollission().instabreak() .sound(SoundType.SOUL_SAND); } //In class PlacedFeatureInit public class PlacedFeatureInit { public static final PlacedFeature CUSTOM_BUSH_PLACED = PlacementUtils.register("custom_bush_placed", ConfigFeatureInit.BERRY_BUSH_CONFIG.placed()); public static final PlacedFeature SOULBERRY_BUSH_PLACED = PlacementUtils.register("soulberry_bush_placed", ConfigFeatureInit.SOULBERRY_BUSH_CONFIG.placed()); } //In class ConfigFeatureInit public static final ConfiguredFeature<RandomPatchConfiguration, ?> SOULBERRY_BUSH_CONFIG = FeatureUtils .register("soulberry_bush_config", Feature.FLOWER.configured(new RandomPatchConfiguration(1, 20, 20, () -> { return Feature.SIMPLE_BLOCK .configured(new SimpleBlockConfiguration(BlockStateProvider.simple( BlockInit.SOULBERRY_BUSH.get().defaultBlockState().setValue(SoulBerryBush.AGE, 3)))) .placed(InSquarePlacement.spread(), PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT, RarityFilter.onAverageOnceEvery(1), BlockPredicateFilter.forPredicate(BlockPredicate.matchesBlocks( Arrays.asList(Blocks.SOUL_SAND, Blocks.SOUL_SOIL, Blocks.NETHERRACK)))); }))); //In class Bush Generation: public class BushGeneration { public static void generateBushes(final BiomeLoadingEvent event) { @SuppressWarnings("unused") ResourceKey<Biome> key = ResourceKey.create(Registry.BIOME_REGISTRY, event.getName()); ResourceLocation biome = event.getName(); List<Supplier<PlacedFeature>> base = event.getGeneration() .getFeatures(GenerationStep.Decoration.VEGETAL_DECORATION); if (biome.toString().contains("plains")) { base.add(() -> PlacedFeatureInit.CUSTOM_BUSH_PLACED); } else if (biome.toString().contains("soul")) { base.add(() -> PlacedFeatureInit.SOULBERRY_BUSH_PLACED); } } public static void onBiomeLoad(BiomeLoadingEvent event) { generateBushes(event); } }
  2. I was able to figure it out. Thanks for reaching out
  3. I have, but I'm not exactly sure how to adapt/implement them with my own code. Sorry for late reply, I had some work done on my PC.
  4. OhWhoah joined the community
  5. Can someone help me with block generation using forge? I made a custom berry bush but I am having a hard time figuring out how to get it to generate on the surface.

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.