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.

Featured Replies

Posted

Hi

I have been trying to write my first mod I am using forge 1.15.2 - 31.1.49, I started off with something basic, a new block type and then added drops and custom items (tools and armor) made from the new block and this all works.

I would like to finish the mod off by making the new block type appear naturally in the world, I have found a few references to IWorldGenerator although most of these were for 1.12 and these don't seem to carry over nicely.

Is this still the right way to go about it or is there a better way? If there is some documentation or examples of how this works for 1.15.2 that someone can point me to it would be most appreciated thank-you. I looked at Hardores mod but I was unsure if this would be the same for a custom block.

You want Features, there's a DefaultBiomeFeatures class that has methods creating things like ore generation, flowers, trees, etc. and it is great for examples. net.minecraft.world.biome is the package the class is in.

 

You could probably get away with using one of the vanilla features and configuring it with your block, or you could get fancy and create/register your own subclass of Feature and build it yourself.

 

*edit: When looking for info, if it says 1.12 or lower, odds are good that most, if not all, of it has changed for 1.15. Here's a useful link for much of what's changed (there's a link in there too for 1.15 specific stuff, 1.13+ was the big overhaul of much of how things worked, that's why 1.12 guides aren't so good anymore)

https://gist.github.com/williewillus/353c872bcf1a6ace9921189f6100d09a

Edited by Ugdhar

  • Author

I was just looking for something simple to start with. 

Thanks for your help I was able to get it working by following your advise.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.