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.

[1.15.2] Generate Ore Near Specific Block

Featured Replies

Posted

Hey guys,
I am working on a mod that adds new sets of ores to the game, I figured that would be a decent introduction to modding. So far I have been successful in adding an ore, its resource and all tools and whatnot. Now that I have a general understanding of it, I would like to see if its possible to spawn that ore only in the presence of a specific block, in this case lets just say within 5 blocks of lava. I know you would have to loop over all blocks around the ore and check for the specific block, but I am not sure where to do this. From a google session I found references to a WorldGenMinable class, but that seems to be from an older version as I cant find that in 1.15.2. Any suggestions on what I would have to override in order to achieve this? Ideally, I would like to make a new Placement Config like CountRangeNearBlockConfig where it would have the same features as CountRangeConfig,  but with 2 additional variables for the block to check for and the range to search. That way I can set it individually when I add my feature. Any suggestions or if you know of a mod in 1.15.2 that has an ore block that has similar conditional spawning that I could look at would help. 

Thanks

I could tell you how to do this with Custom Ore Generation, but it needs updating, and I can't do it alone. :(

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.