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 started modding a month ago and ran into a problem. I created ore and am unsure how to actually generate it naturally. I would appreciate any help.

You need to register a configured feature. to do so, you can create a field MY_ORE_CONFIG, of type ConfiguredFeature<?, ?>.

Then in the common setup, you want to call Registry.register(), passing in the type of world gen registry (for ores, that's WorldGenRegistries.CONFIGURED_FEATURES), than a string that will be the registry key, and then the actual configured feature. you may want to take a look at the Features class, and see how it creates configured features for ores.

For any standard ore you'll use Feature.ORE.withConfiguration(), and pass the feature configurations, which would be a new instance of a OreFeatureConfig.

Again, looking at the Features class, and how that class register Configured Features should really simplify thing.

ย 

After you have the Configured Feature Registered, you need to add it to the biomes generation algorithm.

You can do this in the BiomeLoadingEvent. simply check the biome category for the biomes that you want (for instance, if you're adding the ore to the overworld, than don't add it to the Nether and End biomes). you can call BiomeLoadingEvent#getGeneration(), to get the biome's generation algorithm, from there you can call BiomeGenerationSettingsBuilder#getFeatures() to get all the features, and you'd need to pass the Generation Stage, for commom ores: GenerationStage.Decoration.Underground. and from there you can call .add() to add your configured feature (note: .add() will expect a Supplier of a ConfiguredFeature)

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.