Master_J Posted January 26 Share Posted January 26 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. 1 Quote Link to comment Share on other sites More sharing options...
ChampionAsh5357 Posted January 26 Share Posted January 26 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. Quote Link to comment Share on other sites More sharing options...
Master_J Posted January 27 Author Share Posted January 27 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" } } } Quote Link to comment Share on other sites More sharing options...
ChampionAsh5357 Posted January 27 Share Posted January 27 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. Quote Link to comment Share on other sites More sharing options...
Master_J Posted January 29 Author Share Posted January 29 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? Quote Link to comment Share on other sites More sharing options...
Warren Tode Posted January 29 Share Posted January 29 This mod does it, so you could try looking at their code to get an idea of how they do it. Or, just use their mod. https://www.curseforge.com/minecraft/mc-mods/shutup-experimental-settings Quote Link to comment Share on other sites More sharing options...
Master_J Posted January 30 Author Share Posted January 30 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. Quote Link to comment Share on other sites More sharing options...
Warren Tode Posted January 30 Share Posted January 30 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.