From cd28cbd2faa83bec85f2d5c1916b450f2916c633 Mon Sep 17 00:00:00 2001 From: Cat Core Date: Thu, 2 Apr 2020 23:30:02 +0200 Subject: [PATCH] Backport Ore generation fix --- .../java/io/github/vampirestudios/raa/api/RAAWorldAPI.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/github/vampirestudios/raa/api/RAAWorldAPI.java b/src/main/java/io/github/vampirestudios/raa/api/RAAWorldAPI.java index e6091218..d9b7b773 100644 --- a/src/main/java/io/github/vampirestudios/raa/api/RAAWorldAPI.java +++ b/src/main/java/io/github/vampirestudios/raa/api/RAAWorldAPI.java @@ -20,7 +20,7 @@ public class RAAWorldAPI { */ public static void generateOresForTarget(Biome biome, OreFeatureConfig.Target target) { Materials.MATERIALS.forEach(material -> { - if (material.getOreInformation().getTargetId() == target.getId()) { + if (Registry.BLOCK.get(material.getOreInformation().getTargetId()) == target.getBlock()) { biome.addFeature(GenerationStep.Feature.UNDERGROUND_ORES, new OreFeature(OreFeatureConfig::deserialize).configure(new OreFeatureConfig(target, Registry.BLOCK.get(Utils.appendToPath(material.getId(), "_ore")).getDefaultState(), material.getOreInformation().getOreClusterSize())) @@ -28,7 +28,7 @@ public static void generateOresForTarget(Biome biome, OreFeatureConfig.Target ta } }); Materials.DIMENSION_MATERIALS.forEach(material -> { - if (material.getOreInformation().getTargetId() == target.getId()) { + if (Registry.BLOCK.get(material.getOreInformation().getTargetId()) == target.getBlock()) { biome.addFeature(GenerationStep.Feature.UNDERGROUND_ORES, new OreFeature(OreFeatureConfig::deserialize).configure(new OreFeatureConfig(target, Registry.BLOCK.get(Utils.appendToPath(material.getId(), "_ore")).getDefaultState(), material.getOreInformation().getOreClusterSize()))