allow replacing ores using the additionalOres config

Closes #185
This commit is contained in:
Ell 2021-01-29 18:03:35 +01:00
parent 1de2852a22
commit ca5cd2dab9

View file

@ -202,8 +202,10 @@ public final class ModConfig {
WeightedOre ore = new WeightedOre(new ResourceLocation(split[0]), Integer.parseInt(split[1]));
String dimension = split[2];
if ("nether".equalsIgnoreCase(dimension)) {
NaturesAuraAPI.NETHER_ORES.removeIf(o -> o.tag.equals(ore.tag));
NaturesAuraAPI.NETHER_ORES.add(ore);
} else if ("overworld".equalsIgnoreCase(dimension)) {
NaturesAuraAPI.OVERWORLD_ORES.removeIf(o -> o.tag.equals(ore.tag));
NaturesAuraAPI.OVERWORLD_ORES.add(ore);
} else {
throw new IllegalArgumentException(dimension);