Ore Tweaker

Ore Tweaker

5M Downloads

[Bug] No Ore Generation

Flainity opened this issue ยท 18 comments

commented

I don't want to reopen this again, but currently I have the same problem.

Minecraft Version

1.16.5

Forge Version

36.2.8

Mod Version

2.5.1

Reference Issue

#32

Describe the bug

As described in #32 , no ores underground, just stone and air.

How to reproduce

I didn't upgrade the mod version. I just installed it today and never used it before. I tried every solution mentioned here, but without success. Neither does reinstalling work, nor deleting and regenerating the default configs.
I also removed every other mod except of World Stripper, still no ore generation.

commented

After some testing I have figured out older OS such as Win7 could cause this issue.
What OS are you guys currently on? @Flainity @Atlntssplayer @jankornfeld @lynnpye

commented

Win 10

commented

Just did another test and works just fine with only Ore Tweaker and World Stripper on a regular Minecraft 1.16.5 world with forge version 36.2.8 and ore tweaker version 2.5.1.
2021-10-22_17 55 20

commented

Lets try to break down this issue.

Can you go download the Curse Forge client https://download.curseforge.com/ if you are not already using this.

  • Select Minecraft.
  • My Modpacks
  • Create a new custom profile
  • Select 1.16.5 and Forge 36.2.8
  • Click Create
  • Click add more content.
  • Search for Ore Tweaker
  • Install
  • Search for World Stripper
  • Install
  • Click Play
  • Wait for Minecraft to boot up
  • Create a new world and select gamemode Creative
  • Once in that world in Creative Mode press delete key

Can you see any ores now, Yes or No?

commented

Hello!
Thank you for this mod and your support!

I have the same or very similar issue to the one reported above.

THE PROBLEM:
With OreTweaker installed and on default settings, the world doesn't have any ores in it.
I only checked the Overworld dimension.

ENVIRONMENT:
Minecraft 1.16.5
Forge 36.2.8
OreTweaker-1.16.5-2.5.1.jar
few other mods, none of them suppose to touch ore gen.

REPRODUCTION STEPS:

  1. I copy the OreTweaker jar file into my mods folder, the same as with every other mod.
  2. I start the game.
  3. I generate a new game in creative mode.
  4. I use world stripper to check for ores.
  5. No ores are found anywhere.
  6. I close the game.
  7. I delete OreTweaker and it's config files.
  8. I re-run the game.
  9. I re-generate the world in creative mode with the same seed as before.
  10. I use world stripper.
  11. There are a lots of ores like it should be in vanilla.

I think this proves that the problem is connected or caused by OreTweaker.

Related problems:

  1. There is no OreTweaker.json generated by default.
    If I create it manually it gets moved into a the "config\oretweaker\backup" folder.
    If I try to write the ore config into OreTweaker.toml the game crashes when loading.

  2. There is no information here or on Cursefoge where this file should be.

  3. There is not enough documentaion what exactly are all the files in "data" and "templates" folders and how to use them. Should they be merged into an OreTweaker.json? If yes where to put this file?

  4. There should be a sample OreTweaker.json downloadable here or generated by the game with the vanilla ore gen. settings in it.

  5. With a proper OreTweaker.json the reported issue with no ores generating by default would probably go away, but I don't know for sure.

  6. In the folder "config\oretweaker\templates\collectives" what is the difference between the files "default.json" and "default_overworld.json".

This is a great mod but it needs a more comprehensible documention and insturctions for the simple minded users, like me. I also checked the Wiki here.

Don't take this the wrong way, but:
I have tried thousands of different windows programs in my life.
I have tried thousands of mods accross many games.
I have tried hundreds of Minecraft mods.
If it takes more than 5 or at the maximum 10 minutes for me to figure out how to change the config for a mod, there is a problem with the mod or the instructions for the mods.

Thank you!

commented

In 1.17.1 this mod was working. But when I installed it in 1.16.5 all ores were gone except one ore from a different mod. (So only Vanilla ores are gone)

In my server console on startup it prints an error:

[12:52:40] [main/ERROR] [oretweaker/]: minecraft:ancient_debris can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:ancient_debris can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:andesite can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:blackstone can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:coal_ore can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:diamond_ore can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:diorite can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:dirt can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:emerald_ore can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:gold_ore can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:granite can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:gravel can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:gravel can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:infested_stone can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:iron_ore can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:lapis_ore can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:magma_block can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:nether_gold_ore can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:nether_gold_ore can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:nether_quartz_ore can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:nether_quartz_ore can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:redstone_ore can't be reconstructed from JSON..
[12:52:40] [main/ERROR] [oretweaker/]: minecraft:soul_sand can't be reconstructed from JSON..

commented

Hello! Thank you for this mod and your support!

I have the same or very similar issue to the one reported above.

THE PROBLEM: With OreTweaker installed and on default settings, the world doesn't have any ores in it. I only checked the Overworld dimension.

ENVIRONMENT: Minecraft 1.16.5 Forge 36.2.8 OreTweaker-1.16.5-2.5.1.jar few other mods, none of them suppose to touch ore gen.

REPRODUCTION STEPS:

  1. I copy the OreTweaker jar file into my mods folder, the same as with every other mod.
  2. I start the game.
  3. I generate a new game in creative mode.
  4. I use world stripper to check for ores.
  5. No ores are found anywhere.
  6. I close the game.
  7. I delete OreTweaker and it's config files.
  8. I re-run the game.
  9. I re-generate the world in creative mode with the same seed as before.
  10. I use world stripper.
  11. There are a lots of ores like it should be in vanilla.

I think this proves that the problem is connected or caused by OreTweaker.

Related problems:

  1. There is no OreTweaker.json generated by default.
    If I create it manually it gets moved into a the "config\oretweaker\backup" folder.
    If I try to write the ore config into OreTweaker.toml the game crashes when loading.
  2. There is no information here or on Cursefoge where this file should be.
  3. There is not enough documentaion what exactly are all the files in "data" and "templates" folders and how to use them. Should they be merged into an OreTweaker.json? If yes where to put this file?
  4. There should be a sample OreTweaker.json downloadable here or generated by the game with the vanilla ore gen. settings in it.
  5. With a proper OreTweaker.json the reported issue with no ores generating by default would probably go away, but I don't know for sure.
  6. In the folder "config\oretweaker\templates\collectives" what is the difference between the files "default.json" and "default_overworld.json".

This is a great mod but it needs a more comprehensible documention and insturctions for the simple minded users, like me. I also checked the Wiki here.

Don't take this the wrong way, but: I have tried thousands of different windows programs in my life. I have tried thousands of mods accross many games. I have tried hundreds of Minecraft mods. If it takes more than 5 or at the maximum 10 minutes for me to figure out how to change the config for a mod, there is a problem with the mod or the instructions for the mods.

Thank you!

The OreTweaker.json is no longer used. If that file is found it is automatically being backed up in the backup folder and deleted. OreTweaker now uses the datafolder that can contain multiple .json files. OreTweaker may not work with every mod out there.

If you still think world stripper does not work for your computer you can try:

Can you go download the Curse Forge client https://download.curseforge.com/ if you are not already using this.

  • Select Minecraft.
  • My Modpacks
  • Create a new custom profile
  • Select 1.16.5 and Forge 36.2.8
  • Click Create
  • Click add more content.
  • Search for Ore Tweaker
  • Install
  • Search for World Stripper
  • Install
  • Click Play
  • Wait for Minecraft to boot up
  • Create a new world and select gamemode Creative
  • Once in that world in Creative Mode press delete key

Can you see any ores now, Yes or No?

If yes, you can slowly add other mods on top of that until you figure out what mod it is conflicting with and report it here so I can see what I can do about it.

if no, what OS are you using?

Currently in the hospital so can't make any code changes right now.

commented

Hmmm, I don't think it could have anything with Java version either. Very hard for me to fix a bug only occurring for some users but not all and especially I can't seem to replicate it. I am still looking for a solution to this.

commented

Right now everything works perfectly fine for me using this setup:

Minecraft: 1.16.5
Forge: 36.2.9
Java: 1.8.0_51 64 bit by Adopt OpenJDK (Hotspot)
OS: Windows 10 Pro
Launched through: CurseForge App
Other mods: World Stripper

commented

Windows 11

I also tried out your solution with a curseforge clean install, but that also didn't work.

commented

I just startet a new fresh install of a 1.17.1 server with this mod and stripper installed (newest versions from curseforge). changed coal and diamond ore to 0. And no ores in the ground and no error message in the console. And I haven't changed the java version.

Minecraft: 1.17.1
Forge: 37.0.103
Java: "16.0.2" 2021-07-20
OS: Windows 10 Pro
Launched through: CurseForge App
Other mods: World Stripper

commented

I added an error above from my server. This could be a good starting point. Do you know where this error is thrown (class and line of code)? @EwyBoy

commented

@jankornfeld yes, gonna look closer into why it does throw that error. I also think if it works for 1.17 it's either a problem with specific java 8 versions or some difference in the code between 1.16 & 1.17. Gonna compare the two different versions and see if I can find anything. Then I will test on some other Java 8 distributions and versions and see if it can have anything to do with that.

commented

@EwyBoy I believe that 1.17.1 is using Java 16. At least the server is only starting with that version

commented

@jankornfeld Yes, 1.17 changed to Java 16, so I suspect java version could be the cause of the bug.

commented

Feel free to update ur Java 8 to this version that is confirmed to work:
https://adoptium.net/?variant=openjdk8

and respond if it fixes the issue.

commented

Just tested on a brand new 1.17.1 server with latest forge version with only world stripper and ore tweaker. Also changed coal and diamond ore to 0 like you can see below. Worked perfectly fine for me.

{
  "oreConfig": [
    {
      "ore": "minecraft:coal_ore",
      "filler": "minecraft:stone",
      "minY": 1,
      "maxY": 128,
      "maxVeinSize": 16,
      "spawnRate": 0.0,
      "biomeBlacklist": [],
      "biomeWhitelist": []
    }
  ]
}
{
  "oreConfig": [
    {
      "ore": "minecraft:diamond_ore",
      "filler": "minecraft:stone",
      "minY": 1,
      "maxY": 16,
      "maxVeinSize": 7,
      "spawnRate": 0.0,
      "biomeBlacklist": [],
      "biomeWhitelist": []
    }
  ]
}

No coal or diamond spawned for me like it was configured to and the rest of the ores did. So everything works perfectly fine for me..
2021-11-09_22 17 11

Minecraft: 1.17.1
Forge: 37.0.104
Java: "16.0.2" 64bit
OS: Windows 10 Pro
Launched through: CurseForge App
Other mods: World Stripper

commented

@Flainity @Atlntssplayer @jankornfeld @lynnpye

Hey! Sorry to tag all of you but I believe I have found the cause of the issue.
Its a very technical bug hence why it has taken me so long to be able to fix it.

The bug is caused in this part of the code:

private static ConfiguredFeature<?, ?> reconstructOre(Block ore, Block filler, int minY, int maxY, float spawnRate, int maxVeinSize) {
        ModLogger.debug("Reconstructing ore: " + ore);
        String registryName = String.format("%s_%s_%d_%d_%f_%d",
                Objects.requireNonNull(ore.getRegistryName()).getPath(),
                Objects.requireNonNull(filler.getRegistryName()).getPath(),
                minY, maxY, spawnRate, maxVeinSize
        );
        return register(
                registryName, reconstructFeature(
                        ore,
                        filler,
                        minY,
                        maxY,
                        spawnRate,
                        maxVeinSize
                )
        );
    }

Specifically:

String registryName = String.format("%s_%s_%d_%d_%f_%d",
                Objects.requireNonNull(ore.getRegistryName()).getPath(),
                Objects.requireNonNull(filler.getRegistryName()).getPath(),
                minY, maxY, spawnRate, maxVeinSize
 );

Some Java VMs (Java Virtual Machines) fail to format and cast String.format("%s_%s_%d_%d_%f_%d") properly and ends up creating an illegal ResourceLocation for each ore entry. This is why this bug was not occurring for me and most other people.

I hope it works now cause this bug has been so time consuming and hear tearing to fix.
This specific bug is also not present on Minecraft 1.17.x. This bug can also occur if you mess up your JSON data files so then its probably your fault. But everything should now work out of the box with a clean install with only OreTweaker and World Stripper installed. In the coming days I will work on better debugging tools and making it harder for the end users to mess up the JSON files. Gonna work on a system that catches if it is something wrong and don't allow you to create a world until the JSON files are fixed.

The patch can be found here: https://www.curseforge.com/minecraft/mc-mods/ore-tweaker/files/3520897
So make sure you are using version 2.6.+ from now on.
Please tell me if this patch fixes this issue for you and if you still have problems with this issue on a clean install with the patch comment here.

Thank you for your patience and all help with this issue.