aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/material
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2016-09-19 20:08:42 +1000
committerGitHub <noreply@github.com>2016-09-19 20:08:42 +1000
commit9f386c3c2914ba786ece2afddb8eaa6df80a1adc (patch)
treea46fe4cc2ccd26ff83f3de8eeba7d3abb7aea58c /src/Java/gtPlusPlus/core/material
parent6c74b062034508a0ef00a68c5b4c164b3f155fc4 (diff)
parent2c4e3716a4b72f67be3bde170096394a39c80480 (diff)
downloadGT5-Unofficial-9f386c3c2914ba786ece2afddb8eaa6df80a1adc.tar.gz
GT5-Unofficial-9f386c3c2914ba786ece2afddb8eaa6df80a1adc.tar.bz2
GT5-Unofficial-9f386c3c2914ba786ece2afddb8eaa6df80a1adc.zip
Merge pull request #13 from draknyte1/NewMatSystem
New Back-end systems for dynamic Material (Alloys) and Tool generation. Also fixes a few issues with other things, which were noticed during development of the new systems.
Diffstat (limited to 'src/Java/gtPlusPlus/core/material')
-rw-r--r--src/Java/gtPlusPlus/core/material/ALLOY.java479
-rw-r--r--src/Java/gtPlusPlus/core/material/ELEMENT.java85
-rw-r--r--src/Java/gtPlusPlus/core/material/Material.java154
-rw-r--r--src/Java/gtPlusPlus/core/material/MaterialStack.java72
4 files changed, 790 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/material/ALLOY.java b/src/Java/gtPlusPlus/core/material/ALLOY.java
new file mode 100644
index 0000000000..a4cdd77d59
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/material/ALLOY.java
@@ -0,0 +1,479 @@
+package gtPlusPlus.core.material;
+
+
+public final class ALLOY {
+
+ public static final Material ENERGYCRYSTAL = new Material(
+ "Energy Crystal", //Material Name
+ new short[]{228, 255, 0, 0}, //Material Colour
+ 5660, //Melting Point in C
+ 0, //Boiling Point in C
+ 100, //Protons
+ 100, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ null);
+
+ public static final Material BLOODSTEEL = new Material(
+ "Blood Steel", //Material Name
+ new short[]{142, 28, 0, 0}, //Material Colour
+ 2500, //Melting Point in C
+ 0, //Boiling Point in C
+ 100, //Protons
+ 100, //Neutrons
+ false, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ null);
+
+ public static final Material STABALLOY = new Material(
+ "Staballoy", //Material Name
+ new short[]{68, 75, 66, 0}, //Material Colour
+ 3450, //Melting Point in C
+ ((ELEMENT.URANIUM.getBoilingPoint_C()*9)+(ELEMENT.TITANIUM.getBoilingPoint_C()*1))/10, //Boiling Point in C
+ ((ELEMENT.URANIUM.getProtons()*9)+ELEMENT.TITANIUM.getProtons())/10, //Protons
+ ((ELEMENT.URANIUM.getNeutrons()*9)+ELEMENT.TITANIUM.getNeutrons())/10, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.URANIUM, 90),
+ new MaterialStack(ELEMENT.TITANIUM, 10)
+ });
+
+ public static final Material TANTALLOY_60 = new Material(
+ "Tantalloy-60", //Material Name
+ new short[]{66, 75, 166, 0}, //Material Colour
+ 3025, //Melting Point in C
+ ((ELEMENT.TUNGSTEN.getBoilingPoint_C()*1)+(ELEMENT.TANTALUM.getBoilingPoint_C()*8)+(ELEMENT.TITANIUM.getBoilingPoint_C()*1))/10, //Boiling Point in C
+ ((ELEMENT.TUNGSTEN.getProtons()*1)+(ELEMENT.TANTALUM.getProtons()*8)+(ELEMENT.TITANIUM.getProtons()*1))/10, //Protons
+ ((ELEMENT.TUNGSTEN.getNeutrons()*1)+(ELEMENT.TANTALUM.getNeutrons()*8)+(ELEMENT.TITANIUM.getNeutrons()*1))/10, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.TUNGSTEN, 7),
+ new MaterialStack(ELEMENT.TANTALUM, 90),
+ new MaterialStack(ELEMENT.TANTALUM, 2)
+ });
+
+ public static final Material TANTALLOY_61 = new Material(
+ "Tantalloy-61", //Material Name
+ new short[]{122, 135, 196, 0}, //Material Colour
+ 3030, //Melting Point in C
+ ((ELEMENT.TUNGSTEN.getBoilingPoint_C()*1)+(ELEMENT.TANTALUM.getBoilingPoint_C()*7)+(ELEMENT.TITANIUM.getBoilingPoint_C()*1)+(ELEMENT.YTTRIUM.getBoilingPoint_C()*1))/10, //Boiling Point in C
+ ((ELEMENT.TUNGSTEN.getProtons()*1)+(ELEMENT.TANTALUM.getProtons()*7)+(ELEMENT.TITANIUM.getProtons()*1)+(ELEMENT.YTTRIUM.getProtons()*1))/10, //Protons
+ ((ELEMENT.TUNGSTEN.getNeutrons()*1)+(ELEMENT.TANTALUM.getNeutrons()*7)+(ELEMENT.TITANIUM.getNeutrons()*1)+(ELEMENT.YTTRIUM.getNeutrons()*1))/10, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.TUNGSTEN, 10),
+ new MaterialStack(ELEMENT.TANTALUM, 70),
+ new MaterialStack(ELEMENT.TITANIUM, 10),
+ new MaterialStack(ELEMENT.YTTRIUM, 10)
+ });
+
+ public static final Material QUANTUM = new Material(
+ "Quantum", //Material Name
+ new short[]{128, 128, 128, 0}, //Material Colour
+ 9999, //Melting Point in C
+ 0, //Boiling Point in C
+ 100, //Protons
+ 100, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ null);
+
+ public static final Material BRONZE = new Material(
+ "Bronze", //Material Name
+ new short[]{128, 128, 128, 0}, //Material Colour
+ ((ELEMENT.TIN.getMeltingPoint_C()*1)+(ELEMENT.COPPER.getMeltingPoint_C()*3))/4, //Melting point in C
+ ((ELEMENT.TIN.getBoilingPoint_C()*1)+(ELEMENT.COPPER.getBoilingPoint_C()*3))/4, //Boiling Point in C
+ ((ELEMENT.TIN.getProtons()*1)+(ELEMENT.COPPER.getProtons()*3))/4, //Protons
+ ((ELEMENT.TIN.getNeutrons()*1)+(ELEMENT.COPPER.getNeutrons()*3))/4, //Neutrons
+ false, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.COPPER, 75),
+ new MaterialStack(ELEMENT.TIN, 25)
+ });
+
+ public static final Material TUMBAGA = new Material(
+ "Tumbaga", //Material Name
+ new short[]{255,178,15, 0}, //Material Colour
+ ((ELEMENT.GOLD.getMeltingPoint_C()*7)+(ELEMENT.COPPER.getMeltingPoint_C()*3))/10, //Melting point in C
+ ((ELEMENT.GOLD.getBoilingPoint_C()*7)+(ELEMENT.COPPER.getBoilingPoint_C()*3))/10, //Boiling Point in C
+ ((ELEMENT.GOLD.getProtons()*7)+(ELEMENT.COPPER.getProtons()*3))/10, //Protons
+ ((ELEMENT.GOLD.getNeutrons()*7)+(ELEMENT.COPPER.getNeutrons()*3))/10, //Neutrons
+ false, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.GOLD, 70),
+ new MaterialStack(ELEMENT.COPPER, 30)
+ });
+
+ public static final Material POTIN = new Material(
+ "Potin", //Material Name
+ new short[]{201,151,129, 0}, //Material Colour
+ ((ELEMENT.LEAD.getMeltingPoint_C()*4)+(ALLOY.BRONZE.getMeltingPoint_C()*4)+(ELEMENT.TIN.getMeltingPoint_C()*2))/10, //Melting point in C
+ ((ELEMENT.LEAD.getBoilingPoint_C()*4)+(ALLOY.BRONZE.getBoilingPoint_C()*4)+(ELEMENT.TIN.getBoilingPoint_C()*2))/10, //Boiling Point in C
+ ((ELEMENT.LEAD.getProtons()*4)+(ALLOY.BRONZE.getProtons()*4)+(ELEMENT.TIN.getProtons()*2))/10, //Protons
+ ((ELEMENT.LEAD.getNeutrons()*4)+(ALLOY.BRONZE.getNeutrons()*4)+(ELEMENT.TIN.getNeutrons()*2))/10, //Neutrons
+ false, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.LEAD, 40),
+ new MaterialStack(ALLOY.BRONZE, 40),
+ new MaterialStack(ELEMENT.TIN, 20)
+ });
+
+ public static final Material BEDROCKIUM = new Material(
+ "Bedrockium", //Material Name
+ new short[]{32, 32, 32, 0}, //Material Colour
+ 7735, //Melting Point in C
+ 0, //Boiling Point in C
+ 100, //Protons
+ 100, //Neutrons
+ false, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ null);
+
+ public static final Material INCONEL_625 = new Material(
+ "Inconel-625", //Material Name
+ new short[]{128, 200, 128, 0}, //Material Colour
+ 1425, //Melting Point in C
+ ((ELEMENT.NICKEL.getBoilingPoint_C()*6)+(ELEMENT.CHROMIUM.getBoilingPoint_C()*2)+(ELEMENT.IRON.getBoilingPoint_C()*1)+(ELEMENT.MOLYBDENUM.getBoilingPoint_C()*1))/10, //Boiling Point in C
+ ((ELEMENT.NICKEL.getProtons()*6)+(ELEMENT.CHROMIUM.getProtons()*2)+(ELEMENT.IRON.getProtons()*1)+(ELEMENT.MOLYBDENUM.getProtons()*1))/10, //Protons
+ ((ELEMENT.NICKEL.getNeutrons()*6)+(ELEMENT.CHROMIUM.getNeutrons()*2)+(ELEMENT.IRON.getNeutrons()*1)+(ELEMENT.MOLYBDENUM.getNeutrons()*1))/10, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.NICKEL, 60),
+ new MaterialStack(ELEMENT.CHROMIUM, 20),
+ new MaterialStack(ELEMENT.IRON, 10),
+ new MaterialStack(ELEMENT.MOLYBDENUM, 10)
+ });
+
+ public static final Material INCONEL_690 = new Material(
+ "Inconel-690", //Material Name
+ new short[]{118, 220, 138, 0}, //Material Colour
+ 1425, //Melting Point in C
+ ((ELEMENT.NICKEL.getBoilingPoint_C()*6)+(ELEMENT.CHROMIUM.getBoilingPoint_C()*2)+(ELEMENT.NIOBIUM.getBoilingPoint_C()*1)+(ELEMENT.MOLYBDENUM.getBoilingPoint_C()*1))/10, //Boiling Point in C
+ ((ELEMENT.NICKEL.getProtons()*6)+(ELEMENT.CHROMIUM.getProtons()*2)+(ELEMENT.NIOBIUM.getProtons()*1)+(ELEMENT.MOLYBDENUM.getProtons()*1))/10, //Protons
+ ((ELEMENT.NICKEL.getNeutrons()*6)+(ELEMENT.CHROMIUM.getNeutrons()*2)+(ELEMENT.NIOBIUM.getNeutrons()*1)+(ELEMENT.MOLYBDENUM.getNeutrons()*1))/10, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.NICKEL, 60),
+ new MaterialStack(ELEMENT.CHROMIUM, 20),
+ new MaterialStack(ELEMENT.NIOBIUM, 10),
+ new MaterialStack(ELEMENT.MOLYBDENUM, 10)
+ });
+
+ public static final Material INCONEL_792 = new Material(
+ "Inconel-792", //Material Name
+ new short[]{108, 240, 118, 0}, //Material Colour
+ 1425, //Melting Point in C
+ ((ELEMENT.NICKEL.getBoilingPoint_C()*6)+(ELEMENT.CHROMIUM.getBoilingPoint_C()*1)+(ELEMENT.IRON.getBoilingPoint_C()*1)+(ELEMENT.ALUMINIUM.getBoilingPoint_C()*2))/10, //Boiling Point in C
+ ((ELEMENT.NICKEL.getProtons()*6)+(ELEMENT.CHROMIUM.getProtons()*1)+(ELEMENT.IRON.getProtons()*1)+(ELEMENT.ALUMINIUM.getProtons()*2))/10, //Protons
+ ((ELEMENT.NICKEL.getNeutrons()*6)+(ELEMENT.CHROMIUM.getNeutrons()*1)+(ELEMENT.IRON.getNeutrons()*1)+(ELEMENT.ALUMINIUM.getNeutrons()*2))/10, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.NICKEL, 60),
+ new MaterialStack(ELEMENT.CHROMIUM, 10),
+ new MaterialStack(ELEMENT.NIOBIUM, 10),
+ new MaterialStack(ELEMENT.ALUMINIUM, 20)
+ });
+
+ public static final Material STEEL = new Material(
+ "Steel", //Material Name
+ new short[]{180, 180, 20, 0}, //Material Colour
+ ((ELEMENT.CARBON.getMeltingPoint_C()*5)+(ELEMENT.IRON.getMeltingPoint_C()*95))/100, //Melting point in C
+ ((ELEMENT.CARBON.getBoilingPoint_C()*5)+(ELEMENT.IRON.getBoilingPoint_C()*95))/100, //Boiling Point in C
+ ((ELEMENT.CARBON.getProtons()*5)+(ELEMENT.IRON.getProtons()*95))/100, //Protons
+ ((ELEMENT.CARBON.getNeutrons()*5)+(ELEMENT.IRON.getNeutrons()*95))/100, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.CARBON, 05),
+ new MaterialStack(ELEMENT.IRON, 95)
+ });
+
+ public static final Material ZERON_100 = new Material(
+ "Zeron-100", //Material Name
+ new short[]{180, 180, 20, 0}, //Material Colour
+ ((ELEMENT.CHROMIUM.getMeltingPoint_C()*25)+(ELEMENT.NICKEL.getMeltingPoint_C()*6)+(ELEMENT.COBALT.getMeltingPoint_C()*9)+(ALLOY.STEEL.getMeltingPoint_C()*60))/100, //Melting Point in C
+ ((ELEMENT.CHROMIUM.getBoilingPoint_C()*25)+(ELEMENT.NICKEL.getBoilingPoint_C()*6)+(ELEMENT.COBALT.getBoilingPoint_C()*9)+(ALLOY.STEEL.getBoilingPoint_C()*60))/100, //Boiling Point in C
+ ((ELEMENT.CHROMIUM.getProtons()*25)+(ELEMENT.NICKEL.getProtons()*6)+(ELEMENT.COBALT.getProtons()*9)+(ALLOY.STEEL.getProtons()*60))/100, //Protons
+ ((ELEMENT.CHROMIUM.getNeutrons()*25)+(ELEMENT.NICKEL.getNeutrons()*6)+(ELEMENT.COBALT.getNeutrons()*9)+(ALLOY.STEEL.getNeutrons()*60))/100, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.CHROMIUM, 25),
+ new MaterialStack(ELEMENT.NICKEL, 6),
+ new MaterialStack(ELEMENT.COBALT, 9),
+ new MaterialStack(ALLOY.STEEL, 60)
+ });
+
+ public static final Material MARAGING250 = new Material(
+ "Maraging Steel 250", //Material Name
+ new short[]{140, 140, 140, 0}, //Material Colour
+ 1413, //Melting Point in C
+ ((ELEMENT.TITANIUM.getBoilingPoint_C()*5)+(ELEMENT.NICKEL.getBoilingPoint_C()*16)+(ELEMENT.COBALT.getBoilingPoint_C()*9)+(ALLOY.STEEL.getBoilingPoint_C()*70))/100, //Boiling Point in C
+ ((ELEMENT.TITANIUM.getProtons()*5)+(ELEMENT.NICKEL.getProtons()*16)+(ELEMENT.COBALT.getProtons()*9)+(ALLOY.STEEL.getProtons()*70))/100, //Protons
+ ((ELEMENT.TITANIUM.getNeutrons()*5)+(ELEMENT.NICKEL.getNeutrons()*16)+(ELEMENT.COBALT.getNeutrons()*9)+(ALLOY.STEEL.getNeutrons()*70))/100, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.TITANIUM, 5),
+ new MaterialStack(ELEMENT.NICKEL, 16),
+ new MaterialStack(ELEMENT.COBALT, 9),
+ new MaterialStack(ALLOY.STEEL, 70)
+ });
+
+ public static final Material MARAGING300 = new Material(
+ "Maraging Steel 300", //Material Name
+ new short[]{150, 150, 150, 0}, //Material Colour
+ 1413, //Melting Point in C
+ ((ELEMENT.TITANIUM.getBoilingPoint_C()*10)+(ELEMENT.NICKEL.getBoilingPoint_C()*21)+(ELEMENT.COBALT.getBoilingPoint_C()*14)+(ALLOY.STEEL.getBoilingPoint_C()*55))/100, //Boiling Point in C
+ ((ELEMENT.TITANIUM.getProtons()*10)+(ELEMENT.NICKEL.getProtons()*21)+(ELEMENT.COBALT.getProtons()*14)+(ALLOY.STEEL.getProtons()*55))/100, //Protons
+ ((ELEMENT.TITANIUM.getNeutrons()*10)+(ELEMENT.NICKEL.getNeutrons()*21)+(ELEMENT.COBALT.getNeutrons()*14)+(ALLOY.STEEL.getNeutrons()*55))/100, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.TITANIUM, 10),
+ new MaterialStack(ELEMENT.NICKEL, 21),
+ new MaterialStack(ELEMENT.COBALT, 14),
+ new MaterialStack(ALLOY.STEEL, 55)
+ });
+
+ public static final Material MARAGING350 = new Material(
+ "Maraging Steel 350", //Material Name
+ new short[]{160, 160, 160, 0}, //Material Colour
+ 1413, //Melting Point in C
+ ((ELEMENT.TITANIUM.getBoilingPoint_C()*15)+(ELEMENT.NICKEL.getBoilingPoint_C()*21)+(ELEMENT.COBALT.getBoilingPoint_C()*9)+(ALLOY.STEEL.getBoilingPoint_C()*55))/100, //Boiling Point in C
+ ((ELEMENT.TITANIUM.getProtons()*15)+(ELEMENT.NICKEL.getProtons()*21)+(ELEMENT.COBALT.getProtons()*9)+(ALLOY.STEEL.getProtons()*55))/100, //Protons
+ ((ELEMENT.TITANIUM.getNeutrons()*15)+(ELEMENT.NICKEL.getNeutrons()*21)+(ELEMENT.COBALT.getNeutrons()*9)+(ALLOY.STEEL.getNeutrons()*55))/100, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.TITANIUM, 15),
+ new MaterialStack(ELEMENT.NICKEL, 21),
+ new MaterialStack(ELEMENT.COBALT, 9),
+ new MaterialStack(ALLOY.STEEL, 55)
+ });
+
+ public static final Material STELLITE = new Material(
+ "Stellite", //Material Name
+ new short[]{129, 75, 120, 0}, //Material Colour
+ 1310, //Melting Point in C
+ ((ELEMENT.TITANIUM.getBoilingPoint_C()*10)+(ELEMENT.CHROMIUM.getBoilingPoint_C()*35)+(ELEMENT.COBALT.getBoilingPoint_C()*35)+(ELEMENT.MANGANESE.getBoilingPoint_C()*20))/100, //Boiling Point in C
+ ((ELEMENT.TITANIUM.getProtons()*10)+(ELEMENT.CHROMIUM.getProtons()*35)+(ELEMENT.COBALT.getProtons()*35)+(ELEMENT.MANGANESE.getProtons()*20))/100, //Protons
+ ((ELEMENT.TITANIUM.getNeutrons()*10)+(ELEMENT.CHROMIUM.getNeutrons()*35)+(ELEMENT.COBALT.getNeutrons()*35)+(ELEMENT.MANGANESE.getNeutrons()*20))/100, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.COBALT, 35),
+ new MaterialStack(ELEMENT.CHROMIUM, 35),
+ new MaterialStack(ELEMENT.MANGANESE, 20),
+ new MaterialStack(ELEMENT.TITANIUM, 10)
+ });
+
+ public static final Material TALONITE = new Material(
+ "Talonite", //Material Name
+ new short[]{228, 75, 120, 0}, //Material Colour
+ 1454, //Melting Point in C
+ ((ELEMENT.MOLYBDENUM.getBoilingPoint_C()*10)+(ELEMENT.CHROMIUM.getBoilingPoint_C()*30)+(ELEMENT.COBALT.getBoilingPoint_C()*40)+(ELEMENT.PHOSPHORUS.getBoilingPoint_C()*20))/100, //Boiling Point in C
+ ((ELEMENT.MOLYBDENUM.getProtons()*10)+(ELEMENT.CHROMIUM.getProtons()*30)+(ELEMENT.COBALT.getProtons()*40)+(ELEMENT.PHOSPHORUS.getProtons()*20))/100, //Protons
+ ((ELEMENT.MOLYBDENUM.getNeutrons()*10)+(ELEMENT.CHROMIUM.getNeutrons()*30)+(ELEMENT.COBALT.getNeutrons()*40)+(ELEMENT.PHOSPHORUS.getNeutrons()*20))/100, //Neutrons
+ false, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.COBALT, 40),
+ new MaterialStack(ELEMENT.CHROMIUM, 30),
+ new MaterialStack(ELEMENT.PHOSPHORUS, 20),
+ new MaterialStack(ELEMENT.MOLYBDENUM, 10)
+ });
+
+ public static final Material HASTELLOY_W = new Material(
+ "Hastelloy-W", //Material Name
+ new short[]{218, 165, 32, 0}, //Material Colour
+ 1350, //Melting Point in C
+ ((ELEMENT.IRON.getBoilingPoint_C()*6)+(ELEMENT.MOLYBDENUM.getBoilingPoint_C()*24)+(ELEMENT.CHROMIUM.getBoilingPoint_C()*5)+(ELEMENT.NICKEL.getBoilingPoint_C()*65))/100, //Boiling Point in C
+ ((ELEMENT.IRON.getProtons()*6)+(ELEMENT.MOLYBDENUM.getProtons()*24)+(ELEMENT.CHROMIUM.getProtons()*5)+(ELEMENT.NICKEL.getProtons()*65))/100, //Protons
+ ((ELEMENT.IRON.getNeutrons()*6)+(ELEMENT.MOLYBDENUM.getNeutrons()*24)+(ELEMENT.CHROMIUM.getNeutrons()*5)+(ELEMENT.NICKEL.getNeutrons()*65))/100, //Neutrons
+ false, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.IRON, 06),
+ new MaterialStack(ELEMENT.MOLYBDENUM, 24),
+ new MaterialStack(ELEMENT.CHROMIUM, 5),
+ new MaterialStack(ELEMENT.NICKEL, 65)
+ });
+
+ public static final Material HASTELLOY_X = new Material(
+ "Hastelloy-X", //Material Name
+ new short[]{255, 193, 37, 0}, //Material Colour
+ 1350, //Melting Point in C
+ ((ELEMENT.IRON.getBoilingPoint_C()*18)+(ELEMENT.MOLYBDENUM.getBoilingPoint_C()*9)+(ELEMENT.CHROMIUM.getBoilingPoint_C()*22)+(ELEMENT.NICKEL.getBoilingPoint_C()*51))/100, //Boiling Point in C
+ ((ELEMENT.IRON.getProtons()*18)+(ELEMENT.MOLYBDENUM.getProtons()*9)+(ELEMENT.CHROMIUM.getProtons()*22)+(ELEMENT.NICKEL.getProtons()*51))/100, //Protons
+ ((ELEMENT.IRON.getNeutrons()*18)+(ELEMENT.MOLYBDENUM.getNeutrons()*9)+(ELEMENT.CHROMIUM.getNeutrons()*22)+(ELEMENT.NICKEL.getNeutrons()*51))/100, //Neutrons
+ false, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.IRON, 18),
+ new MaterialStack(ELEMENT.MOLYBDENUM, 9),
+ new MaterialStack(ELEMENT.CHROMIUM, 22),
+ new MaterialStack(ELEMENT.NICKEL, 51)
+ });
+
+ public static final Material HASTELLOY_N = new Material(
+ "Hastelloy-N", //Material Name
+ new short[]{236, 213, 48, 0}, //Material Colour
+ 1350, //Melting Point in C
+ ((ELEMENT.YTTRIUM.getBoilingPoint_C()*5)+(ELEMENT.MOLYBDENUM.getBoilingPoint_C()*16)+(ELEMENT.CHROMIUM.getBoilingPoint_C()*7)+(ELEMENT.NICKEL.getBoilingPoint_C()*72))/100, //Boiling Point in C
+ ((ELEMENT.YTTRIUM.getProtons()*5)+(ELEMENT.MOLYBDENUM.getProtons()*16)+(ELEMENT.CHROMIUM.getProtons()*7)+(ELEMENT.NICKEL.getProtons()*72))/100, //Protons
+ ((ELEMENT.YTTRIUM.getNeutrons()*5)+(ELEMENT.MOLYBDENUM.getNeutrons()*16)+(ELEMENT.CHROMIUM.getNeutrons()*7)+(ELEMENT.NICKEL.getNeutrons()*72))/100, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.YTTRIUM, 05),
+ new MaterialStack(ELEMENT.MOLYBDENUM, 16),
+ new MaterialStack(ELEMENT.CHROMIUM, 7),
+ new MaterialStack(ELEMENT.NICKEL, 72)
+ });
+
+ public static final Material HASTELLOY_C276 = new Material(
+ "Hastelloy-C276", //Material Name
+ new short[]{238, 180, 34, 0}, //Material Colour
+ 1350, //Melting Point in C
+ ((ELEMENT.COBALT.getBoilingPoint_C()*2)+(ELEMENT.MOLYBDENUM.getBoilingPoint_C()*16)+(ELEMENT.CHROMIUM.getBoilingPoint_C()*16)+(ELEMENT.NICKEL.getBoilingPoint_C()*66))/100, //Boiling Point in C
+ ((ELEMENT.COBALT.getProtons()*2)+(ELEMENT.MOLYBDENUM.getProtons()*16)+(ELEMENT.CHROMIUM.getProtons()*16)+(ELEMENT.NICKEL.getProtons()*66))/100, //Protons
+ ((ELEMENT.COBALT.getNeutrons()*2)+(ELEMENT.MOLYBDENUM.getNeutrons()*16)+(ELEMENT.CHROMIUM.getNeutrons()*16)+(ELEMENT.NICKEL.getNeutrons()*66))/100, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.COBALT, 02),
+ new MaterialStack(ELEMENT.MOLYBDENUM, 16),
+ new MaterialStack(ELEMENT.CHROMIUM, 16),
+ new MaterialStack(ELEMENT.NICKEL, 66)
+ });
+
+ public static final Material INCOLOY_020 = new Material(
+ "Incoloy-020", //Material Name
+ new short[]{101, 81, 71, 0}, //Material Colour
+ 1425, //Melting Point in C
+ ((ELEMENT.IRON.getBoilingPoint_C()*40)+(ELEMENT.COPPER.getBoilingPoint_C()*4)+(ELEMENT.CHROMIUM.getBoilingPoint_C()*20)+(ELEMENT.NICKEL.getBoilingPoint_C()*36))/100, //Boiling Point in C
+ ((ELEMENT.IRON.getProtons()*40)+(ELEMENT.COPPER.getProtons()*4)+(ELEMENT.CHROMIUM.getProtons()*20)+(ELEMENT.NICKEL.getProtons()*36))/100, //Protons
+ ((ELEMENT.IRON.getNeutrons()*40)+(ELEMENT.COPPER.getNeutrons()*4)+(ELEMENT.CHROMIUM.getNeutrons()*20)+(ELEMENT.NICKEL.getNeutrons()*36))/100, //Neutrons
+ false, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.IRON, 40),
+ new MaterialStack(ELEMENT.COPPER, 4),
+ new MaterialStack(ELEMENT.CHROMIUM, 20),
+ new MaterialStack(ELEMENT.NICKEL, 36)
+ });
+
+ public static final Material INCOLOY_DS = new Material(
+ "Incoloy-DS", //Material Name
+ new short[]{71, 101, 81, 0}, //Material Colour
+ 1425, //Melting Point in C
+ ((ELEMENT.IRON.getBoilingPoint_C()*46)+(ELEMENT.COBALT.getBoilingPoint_C()*18)+(ELEMENT.CHROMIUM.getBoilingPoint_C()*18)+(ELEMENT.NICKEL.getBoilingPoint_C()*18))/100, //Boiling Point in C
+ ((ELEMENT.IRON.getProtons()*46)+(ELEMENT.COBALT.getProtons()*18)+(ELEMENT.CHROMIUM.getProtons()*18)+(ELEMENT.NICKEL.getProtons()*18))/100, //Protons
+ ((ELEMENT.IRON.getNeutrons()*46)+(ELEMENT.COBALT.getNeutrons()*18)+(ELEMENT.CHROMIUM.getNeutrons()*18)+(ELEMENT.NICKEL.getNeutrons()*18))/100, //Neutrons
+ false, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.IRON, 46),
+ new MaterialStack(ELEMENT.COBALT, 18),
+ new MaterialStack(ELEMENT.CHROMIUM, 18),
+ new MaterialStack(ELEMENT.NICKEL, 18)
+ });
+
+ public static final Material INCOLOY_MA956 = new Material(
+ "Incoloy-MA956", //Material Name
+ new short[]{81, 71, 101, 0}, //Material Colour
+ 1425, //Melting Point in C
+ ((ELEMENT.IRON.getBoilingPoint_C()*75)+(ELEMENT.ALUMINIUM.getBoilingPoint_C()*4)+(ELEMENT.CHROMIUM.getBoilingPoint_C()*20)+(ELEMENT.YTTRIUM.getBoilingPoint_C()*1))/100, //Boiling Point in C
+ ((ELEMENT.IRON.getProtons()*75)+(ELEMENT.ALUMINIUM.getProtons()*4)+(ELEMENT.CHROMIUM.getProtons()*20)+(ELEMENT.YTTRIUM.getProtons()*1))/100, //Protons
+ ((ELEMENT.IRON.getNeutrons()*75)+(ELEMENT.ALUMINIUM.getNeutrons()*4)+(ELEMENT.CHROMIUM.getNeutrons()*20)+(ELEMENT.YTTRIUM.getNeutrons()*1))/100, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.IRON, 75),
+ new MaterialStack(ELEMENT.ALUMINIUM, 4),
+ new MaterialStack(ELEMENT.CHROMIUM, 20),
+ new MaterialStack(ELEMENT.YTTRIUM, 1)
+ });
+
+ public static final Material TUNGSTEN_CARBIDE = new Material(
+ "Tungsten Carbide", //Material Name
+ new short[]{44, 44, 44, 0}, //Material Colour
+ 3422, //Melting Point in C
+ ((ELEMENT.TUNGSTEN.getBoilingPoint_C()*5)+(ELEMENT.CARBON.getBoilingPoint_C()*5))/10, //Boiling Point in C
+ ((ELEMENT.TUNGSTEN.getProtons()*5)+(ELEMENT.CARBON.getProtons()*5))/10, //Protons
+ ((ELEMENT.TUNGSTEN.getNeutrons()*5)+(ELEMENT.CARBON.getNeutrons()*5))/10, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.CARBON, 50),
+ new MaterialStack(ELEMENT.TUNGSTEN, 50)
+ });
+
+ public static final Material SILICON_CARBIDE = new Material(
+ "Silicon Carbide", //Material Name
+ new short[]{40, 48, 36, 0}, //Material Colour
+ 1414, //Melting Point in C
+ ((ELEMENT.SILICON.getBoilingPoint_C()*5)+(ELEMENT.CARBON.getBoilingPoint_C()*5))/10, //Boiling Point in C
+ ((ELEMENT.SILICON.getProtons()*5)+(ELEMENT.CARBON.getProtons()*5))/10, //Protons
+ ((ELEMENT.SILICON.getNeutrons()*5)+(ELEMENT.CARBON.getNeutrons()*5))/10, //Neutrons
+ false, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.CARBON, 50),
+ new MaterialStack(ELEMENT.SILICON, 50)
+ });
+
+ public static final Material TANTALUM_CARBIDE = new Material(
+ "Tantalum Carbide", //Material Name
+ new short[]{139, 136, 120, 0}, //Material Colour
+ 2980, //Melting Point in C
+ ((ELEMENT.TANTALUM.getBoilingPoint_C()*5)+(ELEMENT.CARBON.getBoilingPoint_C()*5))/10, //Boiling Point in C
+ ((ELEMENT.TANTALUM.getProtons()*5)+(ELEMENT.CARBON.getProtons()*5))/10, //Protons
+ ((ELEMENT.TANTALUM.getNeutrons()*5)+(ELEMENT.CARBON.getNeutrons()*5))/10, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.CARBON, 50),
+ new MaterialStack(ELEMENT.TANTALUM, 50)
+ });
+
+ public static final Material ZIRCONIUM_CARBIDE = new Material(
+ "Zirconium Carbide", //Material Name
+ new short[]{222, 202, 180, 0}, //Material Colour
+ 1855, //Melting Point in C
+ ((ELEMENT.ZIRCONIUM.getBoilingPoint_C()*5)+(ELEMENT.CARBON.getBoilingPoint_C()*5))/10, //Boiling Point in C
+ ((ELEMENT.ZIRCONIUM.getProtons()*5)+(ELEMENT.CARBON.getProtons()*5))/10, //Protons
+ ((ELEMENT.ZIRCONIUM.getNeutrons()*5)+(ELEMENT.CARBON.getNeutrons()*5))/10, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.CARBON, 50),
+ new MaterialStack(ELEMENT.ZIRCONIUM, 50)
+ });
+
+ public static final Material NIOBIUM_CARBIDE = new Material(
+ "Niobium Carbide", //Material Name
+ new short[]{205, 197, 191, 0}, //Material Colour
+ 2477, //Melting Point in C
+ ((ELEMENT.NIOBIUM.getBoilingPoint_C()*5)+(ELEMENT.CARBON.getBoilingPoint_C()*5))/10, //Boiling Point in C
+ ((ELEMENT.NIOBIUM.getProtons()*5)+(ELEMENT.CARBON.getProtons()*5))/10, //Protons
+ ((ELEMENT.NIOBIUM.getNeutrons()*5)+(ELEMENT.CARBON.getNeutrons()*5))/10, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.CARBON, 50),
+ new MaterialStack(ELEMENT.NIOBIUM, 50)
+ });
+
+
+}
diff --git a/src/Java/gtPlusPlus/core/material/ELEMENT.java b/src/Java/gtPlusPlus/core/material/ELEMENT.java
new file mode 100644
index 0000000000..307105eaf0
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/material/ELEMENT.java
@@ -0,0 +1,85 @@
+package gtPlusPlus.core.material;
+
+import gregtech.api.enums.Materials;
+import gtPlusPlus.core.util.materials.MaterialUtils;
+
+public final class ELEMENT {
+
+
+ //First 50 Elements
+ public static final Material HYDROGEN = MaterialUtils.generateMaterialFromGtENUM(Materials.Hydrogen);
+ public static final Material HELIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Helium);
+ public static final Material LITHIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Lithium);
+ public static final Material BERYLLIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Beryllium);
+ public static final Material BORON = MaterialUtils.generateMaterialFromGtENUM(Materials.Boron);
+ public static final Material CARBON = MaterialUtils.generateMaterialFromGtENUM(Materials.Carbon);
+ public static final Material NITROGEN = MaterialUtils.generateMaterialFromGtENUM(Materials.Nitrogen);
+ public static final Material OXYGEN = MaterialUtils.generateMaterialFromGtENUM(Materials.Oxygen);
+ public static final Material FLUORINE = MaterialUtils.generateMaterialFromGtENUM(Materials.Fluorine);
+ //public static final Material NEON = MaterialUtils.generateMaterialFromGtENUM(Materials.Ne);
+ public static final Material SODIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Sodium);
+ public static final Material MAGNESIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Magnesium);
+ public static final Material ALUMINIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Aluminium);
+ public static final Material SILICON = MaterialUtils.generateMaterialFromGtENUM(Materials.Silicon);
+ public static final Material PHOSPHORUS = MaterialUtils.generateMaterialFromGtENUM(Materials.Phosphorus);
+ public static final Material SULFUR = MaterialUtils.generateMaterialFromGtENUM(Materials.Sulfur);
+ public static final Material CHLORINE = MaterialUtils.generateMaterialFromGtENUM(Materials.Chlorine);
+ public static final Material ARGON = MaterialUtils.generateMaterialFromGtENUM(Materials.Argon);
+ public static final Material POTASSIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Potassium);
+ public static final Material CALCIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Calcium);
+ public static final Material SCANDIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Scandium);
+ public static final Material TITANIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Titanium);
+ public static final Material VANADIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Vanadium);
+ public static final Material CHROMIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Chrome);
+ public static final Material MANGANESE = MaterialUtils.generateMaterialFromGtENUM(Materials.Manganese);
+ public static final Material IRON = MaterialUtils.generateMaterialFromGtENUM(Materials.Iron);
+ public static final Material COBALT = MaterialUtils.generateMaterialFromGtENUM(Materials.Cobalt);
+ public static final Material NICKEL = MaterialUtils.generateMaterialFromGtENUM(Materials.Nickel);
+ public static final Material COPPER = MaterialUtils.generateMaterialFromGtENUM(Materials.Copper);
+ public static final Material ZINC = MaterialUtils.generateMaterialFromGtENUM(Materials.Zinc);
+ public static final Material GALLIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Gallium);
+ //public static final Material GERMANIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Germanium);
+ public static final Material ARSENIC = MaterialUtils.generateMaterialFromGtENUM(Materials.Arsenic);
+ //public static final Material SELENIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Selenium);
+ //public static final Material BROMINE = MaterialUtils.generateMaterialFromGtENUM(Materials.Bromine);
+ //public static final Material KRYPTON = MaterialUtils.generateMaterialFromGtENUM(Materials.Krypton);
+ public static final Material RUBIDIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Rubidium);
+ public static final Material STRONTIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Strontium);
+ public static final Material YTTRIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Yttrium);
+ public static final Material ZIRCONIUM = new Material("Zirconium", new short[]{255, 250, 205}, 1855, 4377, 40, 51, false, null);//Not a GT Inherited Material
+ public static final Material NIOBIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Niobium);
+ public static final Material MOLYBDENUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Molybdenum);
+ //public static final Material TECHNETIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Technetium);
+ //public static final Material RUTHENIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Ruthenium);
+ //public static final Material RHODIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Rhodium);
+ public static final Material PALLADIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Palladium);
+ public static final Material SILVER = MaterialUtils.generateMaterialFromGtENUM(Materials.Silver);
+ public static final Material CADMIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Cadmium);
+ public static final Material INDIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Indium);
+ public static final Material TIN = MaterialUtils.generateMaterialFromGtENUM(Materials.Tin);
+
+
+
+
+
+
+
+
+
+ //Second 50 elements
+ public static final Material TANTALUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Tantalum);
+ public static final Material TUNGSTEN = MaterialUtils.generateMaterialFromGtENUM(Materials.Tungsten);
+ public static final Material OSMIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Osmium);
+ public static final Material IRIDIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Iridium);
+ public static final Material PLATINUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Platinum);
+ public static final Material GOLD = MaterialUtils.generateMaterialFromGtENUM(Materials.Gold);
+ public static final Material LEAD = MaterialUtils.generateMaterialFromGtENUM(Materials.Lead);
+ public static final Material BISMUTH = MaterialUtils.generateMaterialFromGtENUM(Materials.Bismuth);
+ public static final Material RADON = MaterialUtils.generateMaterialFromGtENUM(Materials.Radon);
+ public static final Material THORIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Thorium);
+ public static final Material URANIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Uranium);
+ public static final Material PLUTONIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Plutonium);
+ public static final Material URANIUM233 = new Material("Uranium-233", new short[]{73, 220, 83, 0}, 1132, 4131, 92, 141, false, null);//Not a GT Inherited Material
+
+
+}
diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java
new file mode 100644
index 0000000000..2939016798
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/material/Material.java
@@ -0,0 +1,154 @@
+package gtPlusPlus.core.material;
+
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.item.UtilsItems;
+import gtPlusPlus.core.util.math.MathUtils;
+import net.minecraft.item.ItemStack;
+
+public class Material {
+
+ final String unlocalizedName;
+ final String localizedName;
+
+ private MaterialStack[] materialInput = new MaterialStack[4];
+
+ final short[] RGBA;
+
+ final boolean usesBlastFurnace;
+
+ final int meltingPointK;
+ final int boilingPointK;
+ final int meltingPointC;
+ final int boilingPointC;
+ final long vProtons;
+ final long vNeutrons;
+ final long vMass;
+
+ public Material(String materialName, short[] rgba, int meltingPoint, int boilingPoint, long protons, long neutrons, boolean blastFurnace, MaterialStack[] inputs){
+
+ this.unlocalizedName = Utils.sanitizeString(materialName);
+ this.localizedName = materialName;
+ this.RGBA = rgba;
+ this.meltingPointC = meltingPoint;
+ if (boilingPoint == 0){
+ boilingPoint = meltingPoint*4;
+ }
+ this.boilingPointC = boilingPoint;
+ this.meltingPointK = (int) MathUtils.celsiusToKelvin(meltingPointC);
+ this.boilingPointK = (int) MathUtils.celsiusToKelvin(boilingPointC);
+ this.vProtons = protons;
+ this.vNeutrons = neutrons;
+ this.vMass = getMass();
+ this.usesBlastFurnace = blastFurnace;
+
+ if (inputs == null){
+ this.materialInput = null;
+ }
+ else {
+ if (inputs.length != 0){
+ for (int i=0; i < inputs.length; i++){
+ if (inputs[i] != null){
+ this.materialInput[i] = inputs[i];
+ }
+ }
+ }
+ }
+ Utils.LOG_INFO("Creating a Material instance for "+materialName);
+ Utils.LOG_INFO("Protons: "+vProtons);
+ Utils.LOG_INFO("Neutrons: "+vNeutrons);
+ Utils.LOG_INFO("Mass: "+vMass+"/units");
+ Utils.LOG_INFO("Melting Point: "+meltingPointC+"C.");
+ Utils.LOG_INFO("Boiling Point: "+boilingPointC+"C.");
+ }
+
+ public String getLocalizedName(){
+ return localizedName;
+ }
+
+ public String getUnlocalizedName(){
+ return unlocalizedName;
+ }
+
+ public short[] getRGBA(){
+ return RGBA;
+ }
+
+ public long getProtons() {
+ return vProtons;
+ }
+
+ public long getNeutrons() {
+ return vNeutrons;
+ }
+
+ public long getMass() {
+ return vProtons + vNeutrons;
+ }
+
+ public int getMeltingPoint_C() {
+ return meltingPointC;
+ }
+
+ public int getBoilingPoint_C() {
+ return boilingPointC;
+ }
+
+ public boolean requiresBlastFurnace(){
+ return usesBlastFurnace;
+ }
+
+ public ItemStack getDust(int stacksize){
+ return UtilsItems.getItemStackOfAmountFromOreDictNoBroken("dust"+unlocalizedName, stacksize);
+ }
+
+ public ItemStack getSmallDust(int stacksize){
+ return UtilsItems.getItemStackOfAmountFromOreDictNoBroken("dustSmall"+unlocalizedName, stacksize);
+ }
+
+ public ItemStack getTinyDust(int stacksize){
+ return UtilsItems.getItemStackOfAmountFromOreDictNoBroken("dustTiny"+unlocalizedName, stacksize);
+ }
+
+ public ItemStack[] getValidInputStacks(){
+ return UtilsItems.validItemsForOreDict(unlocalizedName);
+ }
+
+ public ItemStack[] getMaterialComposites(){
+ //Utils.LOG_INFO("Something requested the materials needed for "+localizedName);
+ if (materialInput != null && materialInput.length >= 1){
+ ItemStack[] temp = new ItemStack[materialInput.length];
+ for (int i=0;i<materialInput.length;i++){
+ //Utils.LOG_INFO("i:"+i);
+ ItemStack testNull = null;
+ try {
+ testNull = materialInput[i].getDustStack();
+ } catch (Throwable r){
+ Utils.LOG_INFO("Failed gathering material stack for "+localizedName+".");
+ Utils.LOG_INFO("What Failed: Length:"+materialInput.length+" current:"+i);
+ }
+ try {
+ if (testNull != null){
+ //Utils.LOG_INFO("not null");
+ temp[i] = materialInput[i].getDustStack();
+ }
+ } catch (Throwable r){
+ Utils.LOG_INFO("Failed setting slot "+i+", using "+localizedName);
+ }
+ }
+ return temp;
+ }
+ return new ItemStack[]{};
+ }
+
+ public int[] getMaterialCompositeStackSizes(){
+ if (materialInput != null && materialInput.length >= 1){
+ int[] temp = new int[materialInput.length];
+ for (int i=0;i<materialInput.length;i++){
+ temp[i] = materialInput[i].getDustStack().stackSize;
+ }
+ return temp;
+ }
+ return new int[]{};
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/core/material/MaterialStack.java b/src/Java/gtPlusPlus/core/material/MaterialStack.java
new file mode 100644
index 0000000000..f8b9b35bd8
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/material/MaterialStack.java
@@ -0,0 +1,72 @@
+package gtPlusPlus.core.material;
+
+import gtPlusPlus.core.util.item.UtilsItems;
+import net.minecraft.item.ItemStack;
+
+public class MaterialStack {
+
+ final Material materialInput;
+ final double percentageToUse;
+
+ public MaterialStack(Material inputs, double percentage){
+
+ this.materialInput = inputs;
+ this.percentageToUse = percentage;
+
+
+ }
+
+ public ItemStack getDustStack(){
+ int caseStatus = 0;
+ int amount = 0;
+ if (percentageToUse >= 0 && percentageToUse <= 0.99){
+ caseStatus = 1;
+ amount = (int) (1/percentageToUse);
+ //amount = Integer.valueOf(String.valueOf(percentageToUse).charAt(2));
+ }
+ else if (percentageToUse >= 1 && percentageToUse <= 9.99){
+ caseStatus = 2;
+ amount = (int) (percentageToUse);
+ //amount = Integer.valueOf(String.valueOf(percentageToUse).charAt(0));
+ }
+ else if (percentageToUse >= 10 && percentageToUse <= 99.99){
+ caseStatus = 3;
+ amount = (int) (percentageToUse/10);
+ //amount = Integer.valueOf(String.valueOf(percentageToUse).charAt(0));
+ }
+ else if (percentageToUse == 100){
+ caseStatus = 4;
+ amount = 10;
+ }
+ else {
+ amount = 0;
+ }
+ switch (caseStatus) {
+ case 1: {
+ return UtilsItems.getItemStackOfAmountFromOreDictNoBroken("dustTiny"+materialInput.unlocalizedName, amount);
+ }
+ case 2: {
+ return UtilsItems.getItemStackOfAmountFromOreDictNoBroken("dustSmall"+materialInput.unlocalizedName, amount);
+ }
+ case 3: {
+ return UtilsItems.getItemStackOfAmountFromOreDictNoBroken("dust"+materialInput.unlocalizedName, amount);
+ }
+ case 4: {
+ return UtilsItems.getItemStackOfAmountFromOreDictNoBroken("dust"+materialInput.unlocalizedName, amount);
+ }
+ default:
+ return null;
+ }
+
+ }
+
+ public ItemStack[] getValidItemStacks(){
+ return UtilsItems.validItemsForOreDict(materialInput.unlocalizedName);
+ }
+
+
+
+
+
+
+}