Realistic Ore Veins

Realistic Ore Veins

356k Downloads

[1.15.2] Can't define an array of blacklisted dimensions

Shandoo94 opened this issue ยท 4 comments

commented

Forge 31.2.24
OreVeins 5.1.4

I have a dimension rule specified like this:

"dimensions": { "type": "not", "dimensions": [ "minecraft:the_nether", "minecraft:the_end" ] }

I expect it to try to spawn the vein in all dimensions exept the nether and end.
It is done as described in the wiki, but the log throws an error

[15:20:39] [Server thread/WARN]: Vein 'oreveins:overworld/ores/bauxite_ore' failed to parse. This is most likely caused by incorrectly specified JSON.
[15:20:39] [Server thread/WARN]: Error:
com.google.gson.JsonSyntaxException: Expected dimensions to be a JsonObject, was an array (["mi...d"])

commented

While that seems like a bug, I would assume in the meantime this will work for you:

"dimensions": {
  "type": "not",
  "dimensions": {
    "type": "or",
    "dimensions": [
      "minecraft:the_nether",
      "minecraft:the_end"
    ]
  }
}
commented

This produces another error:

[12:02:05] [Server thread/ERROR]: Failed to reload data packs
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) ~[?:1.8.0_51]
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1887) ~[?:1.8.0_51]
at net.minecraft.server.MinecraftServer.func_195568_a(MinecraftServer.java:1467) [?:?]
at net.minecraft.server.MinecraftServer.func_195560_a(MinecraftServer.java:450) [?:?]
at net.minecraft.server.integrated.IntegratedServer.func_71247_a(IntegratedServer.java:77) [?:?]
at net.minecraft.server.integrated.IntegratedServer.func_71197_b(IntegratedServer.java:96) [?:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:613) [?:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51]
Caused by: java.lang.NullPointerException
at com.alcatrazescapee.oreveins.world.rule.DimensionRule$Deserializer.lambda$createSingleRule$0(DimensionRule.java:35) ~[?:5.1.4]
at com.alcatrazescapee.oreveins.world.rule.DimensionRule$Deserializer$$Lambda$13647/120920469.test(Unknown Source) ~[?:?]
at com.alcatrazescapee.oreveins.util.json.PredicateDeserializer.lambda$createCollectionRule$1(PredicateDeserializer.java:79) ~[?:5.1.4]
at com.alcatrazescapee.oreveins.util.json.PredicateDeserializer$$Lambda$13648/236208644.test(Unknown Source) ~[?:?]
at com.alcatrazescapee.oreveins.world.rule.DimensionRule$Deserializer$$Lambda$13649/566365154.test(Unknown Source) ~[?:?]
at com.alcatrazescapee.oreveins.util.json.PredicateDeserializer.deserialize(PredicateDeserializer.java:42) ~[?:5.1.4]
at com.alcatrazescapee.oreveins.util.json.PredicateDeserializer.deserialize(PredicateDeserializer.java:16) ~[?:5.1.4]
at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69) ~[gson-2.8.0.jar:?]

The only thing that worked so far was directly specifying an arry of dimensions, which would then be a whitelist.

commented

I also don't see "type" : "or" as an option in the wiki

commented

Still getting the same error with 5.1.5

example json:

{
"type": "sphere",
"ore": "minecraft:diorite",
"stone": "minecraft:stone",
"count": 1,
"rarity": 1,
"min_y": 0,
"max_y": 60,
"density": 150,
"vertical_size": 3,
"horizontal_size": 3,
"dimensions": {
"type": "not",
"dimensions": {
"type": "or",
"dimensions": [
"minecraft:the_nether",
"minecraft:the_end"
]
}
}
}