diff options
author | Martin Robertz <dream-master@gmx.net> | 2022-09-09 06:36:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-09 06:36:34 +0200 |
commit | 2c8436bda4a97420cf5e20fccbec65d88871fc19 (patch) | |
tree | ffa351f733b5f4188cb25929b6c9ddd1e4f48e01 | |
parent | 76632e19e0c017a216012533e2233362b4694dcd (diff) | |
parent | 02098cc3c56ec71c80e09ee3a0d3672a013010c9 (diff) | |
download | GT5-Unofficial-2c8436bda4a97420cf5e20fccbec65d88871fc19.tar.gz GT5-Unofficial-2c8436bda4a97420cf5e20fccbec65d88871fc19.tar.bz2 GT5-Unofficial-2c8436bda4a97420cf5e20fccbec65d88871fc19.zip |
Merge pull request #26 from GTNewHorizons/FixGtppOres
Added missing gtpp ores
-rw-r--r-- | src/main/java/com/detrav/utils/GTppHelper.java | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/main/java/com/detrav/utils/GTppHelper.java b/src/main/java/com/detrav/utils/GTppHelper.java index e773234e9e..8e018ce386 100644 --- a/src/main/java/com/detrav/utils/GTppHelper.java +++ b/src/main/java/com/detrav/utils/GTppHelper.java @@ -1,7 +1,11 @@ package com.detrav.utils; import gtPlusPlus.core.block.base.BlockBaseOre; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.MISC_MATERIALS; import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.nuclear.FLUORIDES; import net.minecraft.block.Block; import java.util.HashMap; @@ -14,15 +18,35 @@ public class GTppHelper { public static final HashMap<Material,Short> encodeoresGTpp = new HashMap<>(); public static void generate_OreIDs() { - for (short n=0 ; n < gtPlusPlus.core.material.ORES.class.getFields().length ; ++n) { + short n=0; + for (; n < gtPlusPlus.core.material.ORES.class.getFields().length ; ++n) { try { Short i = (short) (n+1); Material m = ((Material)gtPlusPlus.core.material.ORES.class.getFields()[n].get(gtPlusPlus.core.material.ORES.class.getFields()[n])); decodeoresGTpp.put(i,m); encodeoresGTpp.put(m,i); } catch (Exception ignored) {} - } + // Manually add ores from other places than the ore class + // Fluorite + decodeoresGTpp.put((short) (++n + 1), FLUORIDES.FLUORITE); + encodeoresGTpp.put(FLUORIDES.FLUORITE, (short) (n + 1)); + // Rare Earths + decodeoresGTpp.put((short) (++n + 1), MISC_MATERIALS.RARE_EARTH_LOW); + encodeoresGTpp.put(MISC_MATERIALS.RARE_EARTH_LOW, (short) (n + 1)); + decodeoresGTpp.put((short) (++n + 1), MISC_MATERIALS.RARE_EARTH_MID); + encodeoresGTpp.put(MISC_MATERIALS.RARE_EARTH_MID, (short) (n + 1)); + decodeoresGTpp.put((short) (++n + 1), MISC_MATERIALS.RARE_EARTH_HIGH); + encodeoresGTpp.put(MISC_MATERIALS.RARE_EARTH_HIGH, (short) (n + 1)); + // Koboldite + decodeoresGTpp.put((short) (++n + 1), ALLOY.KOBOLDITE); + encodeoresGTpp.put(ALLOY.KOBOLDITE, (short) (n + 1)); + // Runite + decodeoresGTpp.put((short) (++n + 1), ELEMENT.STANDALONE.RUNITE); + encodeoresGTpp.put(ELEMENT.STANDALONE.RUNITE, (short) (n + 1)); + // Ancient granite + decodeoresGTpp.put((short) (++n + 1), ELEMENT.STANDALONE.GRANITE); + encodeoresGTpp.put(ELEMENT.STANDALONE.GRANITE, (short) (n + 1)); } |