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 managed to create dimensions using

public static final ResourceKey<Level> NG_MOON = ResourceKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(NeutronGalaxy.MODID, "ng_moon"));
public static final ResourceKey<DimensionType> NG_MOON_TYPE = ResourceKey.create(Registry.DIMENSION_TYPE_REGISTRY, new ResourceLocation(NeutronGalaxy.MODID, "ng_moon"));

and these two json files

{
  "type": "neutrongalaxy:ng_moon",
  "generator": {
    "type": "minecraft:noise",
    "seed": -485105919,
    "settings": "minecraft:overworld",
    "biome_source": {
      "type": "minecraft:fixed",
      "biome": "minecraft:plains"
    }
  }
}

 

{
  "ultrawarm": false,
  "natural": true,
  "piglin_safe": false,
  "respawn_anchor_works": false,
  "bed_works": false,
  "has_raids": true,
  "has_skylight": true,
  "has_ceiling": false,
  "coordinate_scale": 1,
  "ambient_light": 0,
  "logical_height": 384,
  "effects": "minecraft:overworld",
  "infiniburn": "#minecraft:infiniburn_overworld",
  "min_y": -64,
  "height": 384,
  "monster_spawn_light_level": {
    "type": "minecraft:uniform",
    "value": {
      "min_inclusive": 0,
      "max_inclusive": 7
    }
  },
  "monster_spawn_block_light_limit": 0
}

But I would like to know if it is possible to create the dimensions using code instead of json files, or generate the json files like the loot table and recipe data generators.

10 hours ago, Master_J said:

But I would like to know if it is possible to create the dimensions using code instead of json files, or generate the json files like the loot table and recipe data generators.

Data Generators, there's a whole section on them in the docs and examples on the forge repo.

  • Author

I had a look at the forge repo, but when I switched the branch to 1.19.2, there was no dimension data generator, but I did find this comment:

/*
TODO: Make this a data gen:
data/dimension_settings_test/dimension/test_overworld.json
{
  "#comment": [
    "This is an example Dimension showing how it can be configured to use a custom",
    "DimensionSettings that possess similar generation settings to overworld but",
    "has independently configurable structure settings.",
    "",
    "See the 'settings' field below"
  ],
  "type": "minecraft:overworld",
  "generator": {
    "type": "minecraft:noise",
    "seed": 12345,
    "settings": "dimension_settings_test:test_overworld",
    "biome_source": {
      "preset": "minecraft:overworld",
      "type": "minecraft:multi_noise"
    }
  }
}
*/

 

I would also like to know how to use multiple biomes in this dimension json file like the overworld, instead of making everything the plains biome:

{
  "type": "neutrongalaxy:ng_moon",
  "generator": {
    "type": "minecraft:noise",
    "seed": -485105919,
    "settings": "minecraft:overworld",
    "biome_source": {
      "type": "minecraft:fixed",
      "biome": "minecraft:plains"
    }
  }
}

 

8 hours ago, Master_J said:

I had a look at the forge repo, but when I switched the branch to 1.19.2, there was no dimension data generator, but I did find this comment:

That's what the DatapackBuiltinEntriesProvider is for. It doesn't show the specific dimension, but it can handle any dynamic registry object. I'm guessing that comment is just something nobody bothered to do, which is fair since it affect nothing for dev or production.

8 hours ago, Master_J said:

I would also like to know how to use multiple biomes in this dimension json file like the overworld, instead of making everything the plains biome:

Probably minecraft:noise.

  • Author

I used multiple biomes by setting the type to minecraft:multi_noise.

The dimension is working fine now, but I was wondering if there is a way to supress this warning when creating a new world:

Warning! These settings are using experimental features. These settings are experimental and could one day stop working. Do you wish to proceed?

  • Author
9 hours ago, Warren Tode said:

This mod does it, so you could try looking at their code to get an idea of how they do it.

I had a look at their code using sponge powered mixins, and used sponge powered's mixins to supress all the experimental warnings including the warning when you create a new world, which that mod does not do.

 

Thanks for the help.

51 minutes ago, Master_J said:

I had a look at their code using sponge powered mixins, and used sponge powered's mixins to supress all the experimental warnings including the warning when you create a new world, which that mod does not do.

 

Thanks for the help.

Oh I'm sorry, I thought it would be helpful but I'm glad you got something figured it out.

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.