aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorminecraft7771 <maxim235@gmx.de>2022-09-07 21:12:24 +0200
committerminecraft7771 <maxim235@gmx.de>2022-09-07 21:12:24 +0200
commit476b707aae0a82457429677cc3c7a3b1323ac358 (patch)
tree2eb7e151b4df93bd45962bc7ac61123492b3dcac /src
parent76632e19e0c017a216012533e2233362b4694dcd (diff)
downloadGT5-Unofficial-476b707aae0a82457429677cc3c7a3b1323ac358.tar.gz
GT5-Unofficial-476b707aae0a82457429677cc3c7a3b1323ac358.tar.bz2
GT5-Unofficial-476b707aae0a82457429677cc3c7a3b1323ac358.zip
Added missing gtpp ores
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/detrav/utils/GTppHelper.java17
1 files changed, 15 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..22f825a6b0 100644
--- a/src/main/java/com/detrav/utils/GTppHelper.java
+++ b/src/main/java/com/detrav/utils/GTppHelper.java
@@ -1,7 +1,9 @@
package com.detrav.utils;
import gtPlusPlus.core.block.base.BlockBaseOre;
+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 +16,26 @@ 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));
}