Jump to content

Recommended Posts

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.

  • Thanks 1
Posted

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"
    }
  }
}

 

Posted
  On 1/27/2023 at 6:40 AM, 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:

Expand  

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.

  On 1/27/2023 at 6:40 AM, 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:

Expand  

Probably minecraft:noise.

Posted

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?

Posted
  On 1/29/2023 at 5:47 PM, Warren Tode said:

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

Expand  

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.

Posted
  On 1/30/2023 at 3:17 AM, 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.

Expand  

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Read the posts above yours, it tells you exactly how to do it, instructions are the same if it's making a forge installation or a vanilla one, just make a new folder for the game directory.
    • Yes that’s the full log, I managed to get it working last night, the anvil fix mod is what was causing it to crash
    • Hey guys, i'm currently developping a mod with forge 1.12.2 2860 and i'm using optifine and gradle 4.9. The thing is i'm trying to figure out how to show the player's body in first person. So far everything's going well since i've try to use a shader. The player's body started to blink dark when using a shader. I've try a lot of shader like chocapic, zeus etc etc but still the same issue. So my question is : How should i apply the current shader to the body ? At the same time i'm also drawing a HUD so maybe it could be the problem?   Here is the issue :    And here is the code where i'm trying to display the body :    private static void renderFirstPersonBody(EntityPlayerSP player, float partialTicks) { Minecraft mc = Minecraft.getMinecraft(); GlStateManager.pushMatrix(); GlStateManager.pushAttrib(); try { // Préparation OpenGL GlStateManager.enableDepth(); GlStateManager.depthMask(true); GlStateManager.enableAlpha(); GlStateManager.alphaFunc(GL11.GL_GREATER, 0.1F); GlStateManager.enableBlend(); GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); // Éclairage correct pour shaders GlStateManager.enableLighting(); RenderHelper.enableStandardItemLighting(); GlStateManager.enableRescaleNormal(); // Active la lightmap pour les shaders mc.entityRenderer.enableLightmap(); // Position de rendu interpolée double px = player.lastTickPosX + (player.posX - player.lastTickPosX) * partialTicks; double py = player.lastTickPosY + (player.posY - player.lastTickPosY) * partialTicks; double pz = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * partialTicks; GlStateManager.translate( px - mc.getRenderManager().viewerPosX, py - mc.getRenderManager().viewerPosY, pz - mc.getRenderManager().viewerPosZ ); // Rendu du joueur sans la tête Render<?> render = mc.getRenderManager().getEntityRenderObject(player); if (render instanceof RenderPlayer) { RenderPlayer renderPlayer = (RenderPlayer) render; boolean oldHeadHidden = renderPlayer.getMainModel().bipedHead.isHidden; boolean oldHeadwearHidden = renderPlayer.getMainModel().bipedHeadwear.isHidden; renderPlayer.getMainModel().bipedHead.isHidden = true; renderPlayer.getMainModel().bipedHeadwear.isHidden = true; setArmorHeadVisibility(renderPlayer, false); renderPlayer.doRender(player, 0, 0, 0, player.rotationYaw, partialTicks); renderPlayer.getMainModel().bipedHead.isHidden = oldHeadHidden; renderPlayer.getMainModel().bipedHeadwear.isHidden = oldHeadwearHidden; setArmorHeadVisibility(renderPlayer, !oldHeadwearHidden); } // Nettoyage post rendu mc.entityRenderer.disableLightmap(); GlStateManager.disableRescaleNormal(); } catch (Exception e) { // silent fail } finally { GlStateManager.popAttrib(); GlStateManager.popMatrix(); } }   Ty for your help. 
    • Item successfully registered, but there was a problem with the texture of the item, it did not insert and has just the wrong texture.     
    • Keep on using the original Launcher Run Vanilla 1.12.2 once and close the game Download Optifine and run optifine as installer (click on the optifine jar) Start the launcher and make sure the Optifine profile is selected - then test it again  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.