Realistic Ore Veins

Realistic Ore Veins

310k Downloads

[question] Override veins in new datapack (1.14.4)

Caucorico opened this issue ยท 2 comments

commented

Hello,

First, I would like to thank you for the features of your mod. I really love them and I want to use it with my friends.
Unfortunatly, I have a problem :
I am currently trying to override the default configuration for the coal veins.
I had read the documentation and you wrote this :

Each vein must be a separate json file, located under the path data/domain/[namespace]/oreveins, where namespace is the namespace of your mod or data pack. You should not be using either the minecraft or oreveins namespace!

Okay, I should not using the orveins namespace. But, in the #40 issue, you say :

You need to have a separate namespace for your data pack, otherwise you'll end up overriding the existing veins instead of adding new ones.

Perfect, it's the behaviour that I want.

So, I create a datapack : oreveins-custom and I write a new default_coal.json.
I put the new default_coal.json in this folder : datapacks/oreveins-custom/data/domain/orveins/orveins/.

The datapack is recognized by minecraft :
datapacks

But, unfortunately, my configuration isn't used by minecraft (the default config is still used) :

coal_default

The config that I use :

{
  "type": "curve",
  "ore": [
    {
      "block": "minecraft:coal_ore",
      "weight": 39
    }
  ],
  "stone": "minecraft:stone",
  "rarity": 10,
  "min_y": 0,
  "max_y": 128,
  "density": 80,
  "vertical_size": 15,
  "horizontal_size": 60,
  "radius": 10,
  "angle": 0,
  "conditions": [
    {
      "type": "oreveins:default_veins"
    }
  ]
}

It is the first time that I use datapacks. I had maybe do a mistake...

Regards,

commented

So the documentation is not quite accurate as you're using 1.14 and it's just been recently updated for 1.15 (to the point where the default veins don't exist anymore).

If you want to disable the default veins, the intended method of doing so is to use the config option in the server common config file. That's what

"conditions": [
    {
      "type": "oreveins:default_veins"
    }
  ]

collectively does.

You still should be able to override default ore veins via your approach, my assumption is that you've not ordered the data packs correctly (so instead of yours overwriting the default, yours is loading first and the default is overwriting that.)

Might I also recommend the /clearworld command instead of x-ray as it strips everything except from veins :)

commented

Thank you @alcatrazEscapee for your response !
You are right, I didn't see the parameter inside oreveins-common.toml.
So, I set the enableDefaultVeins parameter to false.
Now, the default veins doesn't appear and the debug proves it :

[25mai2020 17:36:04.280] [Server thread/INFO] [com.alcatrazescapee.oreveins.world.vein.VeinManager/]: Skipping loading vein 'oreveins:default_coal' as it's conditions were not met
[25mai2020 17:36:04.280] [Server thread/INFO] [com.alcatrazescapee.oreveins.world.vein.VeinManager/]: Skipping loading vein 'oreveins:default_emerald' as it's conditions were not met
[25mai2020 17:36:04.280] [Server thread/INFO] [com.alcatrazescapee.oreveins.world.vein.VeinManager/]: Skipping loading vein 'oreveins:default_redstone' as it's conditions were not met
[25mai2020 17:36:04.280] [Server thread/INFO] [com.alcatrazescapee.oreveins.world.vein.VeinManager/]: Skipping loading vein 'oreveins:default_iron' as it's conditions were not met
[25mai2020 17:36:04.280] [Server thread/INFO] [com.alcatrazescapee.oreveins.world.vein.VeinManager/]: Skipping loading vein 'oreveins:default_gold' as it's conditions were not met
[25mai2020 17:36:04.280] [Server thread/INFO] [com.alcatrazescapee.oreveins.world.vein.VeinManager/]: Skipping loading vein 'oreveins:default_diamond' as it's conditions were not met
[25mai2020 17:36:04.280] [Server thread/INFO] [com.alcatrazescapee.oreveins.world.vein.VeinManager/]: Registered 0 Veins Successfully.

In my log, I can see : Registered 0 Veins Successfully.
It is maybe normal, because the custom veins are loaded after.

Unfortunately, for the /clearworld command, it didn't work in my case. I had install the underground biome mod, and the command remove the ore blocks modified by the mod.
It's why I had install X-ray, I could uninstall underground biome during the config of the veins, but I am too lazy.

Regards,