aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/material
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-04-23 13:49:19 +1000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-04-23 13:49:19 +1000
commitc72ea28733af1ea5fae10117b27155c90870850f (patch)
tree77cd6ed101f42152580ac628c534c90ccd663a2e /src/Java/gtPlusPlus/core/material
parent812163905525cabc5cad13358454f22f3109adfb (diff)
downloadGT5-Unofficial-c72ea28733af1ea5fae10117b27155c90870850f.tar.gz
GT5-Unofficial-c72ea28733af1ea5fae10117b27155c90870850f.tar.bz2
GT5-Unofficial-c72ea28733af1ea5fae10117b27155c90870850f.zip
+ Added Rhugnor.
+ Added Carbyne as a proper material. $ Fixed ASM Derp in IC2 Hazmat transformer.
Diffstat (limited to 'src/Java/gtPlusPlus/core/material')
-rw-r--r--src/Java/gtPlusPlus/core/material/ELEMENT.java1
-rw-r--r--src/Java/gtPlusPlus/core/material/Material.java40
2 files changed, 41 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/material/ELEMENT.java b/src/Java/gtPlusPlus/core/material/ELEMENT.java
index e972992391..9ba6fe0f1d 100644
--- a/src/Java/gtPlusPlus/core/material/ELEMENT.java
+++ b/src/Java/gtPlusPlus/core/material/ELEMENT.java
@@ -213,6 +213,7 @@ public final class ELEMENT {
public static final Material CHRONOMATIC_GLASS = new Material("Chromatic Glass", MaterialState.SOLID, new short[]{255, 255, 255, 3}, 9200, 17550, 40, 51, false, "⌘☯𓍰 𓍱 𓍲 𓍳 𓍴 𓍵 𓍶 𓍷 𓍸 ☯⌘ ", 0);//Not a GT Inherited Material
public static final Material ADVANCED_NITINOL = new Material("Advanced Nitinol", MaterialState.SOLID, TextureSets.ENRICHED.get(), ALLOY.NITINOL_60.getRGB(), 8400, 14377, 40, 51, true, "⚷⚙⚷ Ni4Ti6", 0);//Not a GT Inherited Material
public static final Material HYPOGEN = new Material("Hypogen", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{220, 120, 75, 2}, 12255, 19377, 240, 251, true, "Hy⚶", 0);//Not a GT Inherited Material
+ public static final Material RHUGNOR = new Material("Rhugnor", MaterialState.SOLID, TextureSets.ENRICHED.get(), new short[]{190, 0, 255, 0}, 8750, 14757, 184, 142, true, "Fs⚶", 0);//Not a GT Inherited Material //funeris
//Runescape materials
diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java
index 8fb3c5fc3b..6b6be32107 100644
--- a/src/Java/gtPlusPlus/core/material/Material.java
+++ b/src/Java/gtPlusPlus/core/material/Material.java
@@ -14,6 +14,7 @@ import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.TextureSet;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.core.item.base.BaseItemComponent.ComponentTypes;
import gtPlusPlus.core.item.base.cell.BaseItemCell;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.state.MaterialState;
@@ -1331,5 +1332,44 @@ public class Material {
return 75;
}
}
+
+
+
+
+ public boolean registerComponentForMaterial(ComponentTypes aPrefix, ItemStack aStack) {
+ return registerComponentForMaterial(this, aPrefix.getGtOrePrefix(), aStack);
+ }
+
+ public boolean registerComponentForMaterial(OrePrefixes aPrefix, ItemStack aStack) {
+ return registerComponentForMaterial(this, aPrefix, aStack);
+ }
+
+ public static boolean registerComponentForMaterial(Material componentMaterial, ComponentTypes aPrefix, ItemStack aStack) {
+ return registerComponentForMaterial(componentMaterial, aPrefix.getGtOrePrefix(), aStack);
+ }
+
+ public static boolean registerComponentForMaterial(Material componentMaterial, OrePrefixes aPrefix, ItemStack aStack) {
+ if (componentMaterial == null) {
+ return false;
+ }
+ //Register Component
+ Map<String, ItemStack> aMap = Material.mComponentMap.get(componentMaterial.getUnlocalizedName());
+ if (aMap == null) {
+ aMap = new HashMap<String, ItemStack>();
+ }
+ String aKey = aPrefix.name();
+ ItemStack x = aMap.get(aKey);
+ if (x == null) {
+ aMap.put(aKey, aStack);
+ Logger.MATERIALS("Registering a material component. Item: ["+componentMaterial.getUnlocalizedName()+"] Map: ["+aKey+"]");
+ Material.mComponentMap.put(componentMaterial.getUnlocalizedName(), aMap);
+ return true;
+ }
+ else {
+ //Bad
+ Logger.MATERIALS("Tried to double register a material component. ");
+ return false;
+ }
+ }
} \ No newline at end of file