Jump to content

Recommended Posts

Posted

Hello.
Recently I installed the mod Advanced Mining Dimension. 
Using Winrar, I decided to change the datapack in .jar mod, by going to miningdimension.jar/data/mining_dimensions/worldgen/biome/mining.json
So, I modified the .json within the .jar.
The issue is that some features are not recognized. same happened for mekanism ores, which I had to remove. This time it's about underground biomes.
debug.log https://gist.github.com/Daltaxy/9e0b5b95d148afbfc3918a7f63984337
Why does it not work ? Here is the final .json

Spoiler

{
  "scale": 1,
  "effects": {
    "mood_sound": {
      "sound": "minecraft:ambient.cave",
      "tick_delay": 6000,
      "block_search_extent": 8,
      "offset": 2.0
    },
    "sky_color": 0,
    "fog_color": 0,
    "water_color": 4159204,
    "water_fog_color": 329011
  },
  "surface_builder": "mining_dimension:mining",
  "carvers": {
    "air": [
      "minecraft:cave",
      "quark:glimmering_weald",
      "minecraft:lush_caves",
      "minecraft:deep_dark",
      "minecraft:dripstone_caves",
      "minecraft:canyon"
    ]
  },
  "features": [
    [
      "mysticalagriculture:prosperity_ore",
      "mysticalagriculture:inferium_ore",
      "mekanism:deepslate_tin_ore",
      "mekanism:deepslate_osmium_ore",
      "mekanism:deepslate_uranium_ore",
      "mekanism:deepslate_fluorite_ore",
      "mekanism:deepslate_lead_ore",
      "mekanism:tin_ore",
      "mekanism:osmium_ore",
      "mekanism:uranium_ore",
      "mekanism:fluorite_ore",
      "mekanism:lead_ore",
      "minecraft:lake_water",
      "minecraft:lake_lava",
      "minecraft:monster_room",
      "minecraft:ore_dirt",
      "minecraft:ore_gravel",
      "minecraft:ore_granite",
      "minecraft:ore_diorite",
      "minecraft:ore_andesite",
      "minecraft:ore_coal",
      "minecraft:ore_iron",
      "minecraft:ore_gold",
      "minecraft:ore_redstone",
      "minecraft:ore_diamond",
      "minecraft:ore_emerald",
      "minecraft:ore_lapis",
      "minecraft:disk_sand",
      "minecraft:disk_clay",
      "minecraft:disk_gravel"
    ]
  ],
  "starts": [
    "hopo:acacia_mineshaft",
    "hopo:birch_mineshaft",
    "hopo:dark_oak_mineshaft",
    "hopo:deepslate_mineshaft",
    "hopo:jungle_mineshaft",
    "hopo:mangrove_mineshaft",
    "hopo:oak_mineshaft",
    "hopo:spruce_mineshaft",
    "hopo:stone_mineshaft",
    "hopo:stone_mineshaft",
    "hopo:deepslate_mineshaft",
    "minecraft:mineshaft",
    "geode:basalt_glowstone_geode",
    "geode:basalt_quartz_geode",
    "geode:glowstone_geode",
    "geode:quartz_geode",
    "geode:sculk_geode",
    "geode:wrappist_geode",
    "minecraft:ruined_portal"
  ],
  "spawners": {
    "monster": [
      {
        "type": "fromtheshadows:reaper",
        "weight": 75,
        "minCount": 4,
        "maxCount": 4
      },
      {
        "type": "fromtheshadows:ghoul",
        "weight": 50,
        "minCount": 4,
        "maxCount": 4
      },
      {
        "type": "fromtheshadows:revenant",
        "weight": 100,
        "minCount": 4,
        "maxCount": 4
      },
      {
        "type": "fromtheshadows:nightmare",
        "weight": 100,
        "minCount": 4,
        "maxCount": 4
      },
      {
        "type": "minecraft:spider",
        "weight": 100,
        "minCount": 4,
        "maxCount": 4
      },
      {
        "type": "minecraft:zombie",
        "weight": 95,
        "minCount": 4,
        "maxCount": 4
      },
      {
        "type": "minecraft:zombie_villager",
        "weight": 5,
        "minCount": 1,
        "maxCount": 1
      },
      {
        "type": "minecraft:skeleton",
        "weight": 100,
        "minCount": 4,
        "maxCount": 4
      },
      {
        "type": "minecraft:creeper",
        "weight": 100,
        "minCount": 4,
        "maxCount": 4
      },
      {
        "type": "minecraft:slime",
        "weight": 100,
        "minCount": 4,
        "maxCount": 4
      },
      {
        "type": "minecraft:enderman",
        "weight": 10,
        "minCount": 1,
        "maxCount": 4
      },
      {
        "type": "minecraft:witch",
        "weight": 5,
        "minCount": 1,
        "maxCount": 1
      }
    ],
    "creature": [],
    "ambient": [
      {
        "type": "minecraft:bat",
        "weight": 10,
        "minCount": 8,
        "maxCount": 8
      }
    ],
    "water_creature": [],
    "water_ambient": [],
    "misc": []
  },
  "spawn_costs": {},
  "player_spawn_friendly": false,
  "precipitation": "none",
  "temperature": 0.6,
  "downfall": 0.0,
  "category": "none",
  "depth": 0.1
}

 

Thank you for your attention

Posted

You can not edit a .jar file via unpack the .jar.

If you wish to modify a Datapack of a Mod you can create a normal Datapack and edit the file there.
Put the Datapack you created, in the datapack folder of your World (existing World) or choose it while you create the World.

You can take a look at the wiki how to create a Datapack: https://minecraft.fandom.com/wiki/Data_pack
Note: Instead of minecraft you need to use the Mod Id

Posted
8 minutes ago, Luis_ST said:

You can not edit a .jar file via unpack the .jar.

If you wish to modify a Datapack of a Mod you can create a normal Datapack and edit the file there.
Put the Datapack you created, in the datapack folder of your World (existing World) or choose it while you create the World.

You can take a look at the wiki how to create a Datapack: https://minecraft.fandom.com/wiki/Data_pack
Note: Instead of minecraft you need to use the Mod Id

So by putting the datapack in the world datapack folder, it will modify the existing one ?

 

Posted (edited)
3 minutes ago, Luis_ST said:

Yes, but due you override a Biome, the new Biome generation will only affect new generated Biomes.

yeah, I removed the dimension folder to regenerate everything, if that's okay ?

Edited by Daltax
spelling
Posted
2 minutes ago, Luis_ST said:

If the Biome is only generated in this Dimension then yes.

well they aren't only generated there, but they are already present in other dimensions. they just were not in this one mining dimension because it didn't have any generation argument other than caves and canyons

still good ?

Posted
17 minutes ago, Luis_ST said:

If i understand you correctly you want that the modified Biomes also generates in the "Mining Dimension" right?

exactly. along with some ores and some mobs. 

Posted

The Biome generation is not handled via the Biome .json itself. You need to override the BiomeSource .json (Dimension .json include Biome generation) of the Dimension.

The author has published a few data packs which could be used. Unfortunately all of them use a single Biome for the complete World.
If you wish to have only the Biome you modified above in this Dimension you can only change the Biome here to the Biome you want.
If you wish to have multiple Biomes in that Dimension i would recommend you to talk to the author,
since this would be very hard to do without the knowledge how the Mod creates the World and how the Mod sets the Noise values (used from vanilla to generate multiple Biomes).

Posted
8 minutes ago, Luis_ST said:

The Biome generation is not handled via the Biome .json itself. You need to override the BiomeSource .json (Dimension .json include Biome generation) of the Dimension.

The author has published a few data packs which could be used. Unfortunately all of them use a single Biome for the complete World.
If you wish to have only the Biome you modified above in this Dimension you can only change the Biome here to the Biome you want.
If you wish to have multiple Biomes in that Dimension i would recommend you to talk to the author,
since this would be very hard to do without the knowledge how the Mod creates the World and how the Mod sets the Noise values (used from vanilla to generate multiple Biomes).

well. I added everything to a datapack in the world folder, and it crashed. I tried with and without the new biomes in the .json, but it crashed both times.
debug.log https://gist.github.com/Daltaxy/ea1f138d435331471a299c9f7caa7390

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

    • 1) Update to the latest build of Forge for your MC version. The recommended build actually means minimum recommended. I can’t remember if it was backported to 1.20.1 or not, but we did clean up the early loading screen a bit in newer builds to look less cluttered. 2) Change the accessibility setting in game to black background. The early loading screen will then be black instead of red.
    • I'm sure this entire community knows exactly who you are, what mixin you're talking about, and how deer function in minecraft.  But being new here, and I am ignorant about all of those things. That said, I'd love to review your mixin.  I'm also having mixin issues, and I feel that if I can help you, perhaps both of our problems might get solved. Can you provide some links and context for people who aren't aware of your renown?  I'm asking humbly because I know you probably have better things to do, and you just want somebody to fix things for you.
    • I am working in the latest MDK.  Minecraft 1.21.4, Forge 54.1.0. I am trying to create a mixin.  The implementation doesn't matter.  Assume it is doing nothing more than logging to the console: @Mixin(LevelRenderer.class) public abstract class LevelRendererMixin { private static final Logger LOGGER = LogManager.getLogger("LevelRendererMixin"); @Inject(method = "renderLevel", at = @At("TAIL")) private void onRenderLevel( com.mojang.blaze3d.resource.GraphicsResourceAllocator allocator, net.minecraft.client.DeltaTracker deltaTracker, boolean someFlag, Camera camera, GameRenderer gameRenderer, Matrix4f matrix1, Matrix4f matrix2, CallbackInfo ci ) { Assuming my whole implementation is just to write something to console, it works perfectly fine in when I debug (runClient) in IntelliJ.  Whenever the Minecraft `renderLevel` runs every frame, my logging is overlaid at "TAIL". Yes, this spams the sht out of the console. But when I `build` and use the jar as a mod, it does not.  The mixin annotation processor shows to be loading, and my other parts of my mod work, but the nothing gets logged by my mixin. I am apparently generating a proper `refmap` and it's in the jar root.  Other files are also in the jar appropriately, including mods.toml.  And all the naming and reference paths are correct. I had to add this to my build.gradle to get my refmap into the jar ([name] obviously replaced): tasks.register("copyRefmap", Copy) { dependsOn tasks.named("compileJava") from("${project.buildDir}/tmp/compileJava") { include "mixins.[name].refmap.json" } into("${project.buildDir}/resources/main") } tasks.named("processResources", ProcessResources).configure { dependsOn(tasks.named("copyRefmap")) } tasks.named("jar", Jar).configure { // Include the generated refmap from build/resources/main into the jar. from("${project.buildDir}/resources/main") { include "mixins.[name].refmap.json" } }   Just for fun, here is my refmap in case something looks wrong to anybody:   { "mappings": { "com/[name]/mixin/LevelRendererMixin": { "renderLevel": "Lnet/minecraft/client/renderer/LevelRenderer;m_109599_(Lcom/mojang/blaze3d/resource/GraphicsResourceAllocator;Lnet/minecraft/client/DeltaTracker;ZLnet/minecraft/client/Camera;Lnet/minecraft/client/renderer/GameRenderer;Lorg/joml/Matrix4f;Lorg/joml/Matrix4f;)V" } }, "data": { "searge": { "com/[name]/mixin/LevelRendererMixin": { "renderLevel": "Lnet/minecraft/client/renderer/LevelRenderer;m_109599_(Lcom/mojang/blaze3d/resource/GraphicsResourceAllocator;Lnet/minecraft/client/DeltaTracker;ZLnet/minecraft/client/Camera;Lnet/minecraft/client/renderer/GameRenderer;Lorg/joml/Matrix4f;Lorg/joml/Matrix4f;)V" } } } } TLDR; My mixin works in dev, but not when built and run in an official Forge/Minecraft environment.  Like it's not overlaying/replacing the minecraft function. What are some typical other things to check when a mixin works in dev, but not after build?
    • Thank you, Ugdhar.  But that only confirms the problem.  Both in the github and in my IDE, if I search for objects extended from net.minecraftforge.client.event, it isn't there.  Though the javadocs (at least at nekoyue) say it should be. Maybe since it definitely isn't there, is there some other way anybody knows to highlight some blocks (without mixins and drawing artificial faces on the camera).
  • Topics

×
×
  • Create New...

Important Information

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