aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2017-07-05 18:58:45 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2017-07-05 18:58:45 +1000
commit943116768eab1f30696d4c0e6bc5f119c8765ac2 (patch)
tree92e812794907d8014d69d357fa1854de55a70b0a /src/Java/gtPlusPlus/core
parent05740f41d632a0155173c2b1575c501218f9fa5a (diff)
downloadGT5-Unofficial-943116768eab1f30696d4c0e6bc5f119c8765ac2.tar.gz
GT5-Unofficial-943116768eab1f30696d4c0e6bc5f119c8765ac2.tar.bz2
GT5-Unofficial-943116768eab1f30696d4c0e6bc5f119c8765ac2.zip
$ Fixed issue #105.
% Buffed Alloy Blast Smelter to be 20% faster than the Electric Blast Furnace. % Revised times for all GT++ Alloys during smelting. + Added 'Alkalus' to the tooltips of many things hidden within Gregtech. Re:#106. + Added some automatic calculations to the Materials Class.
Diffstat (limited to 'src/Java/gtPlusPlus/core')
-rw-r--r--src/Java/gtPlusPlus/core/material/ALLOY.java188
-rw-r--r--src/Java/gtPlusPlus/core/material/Material.java81
-rw-r--r--src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java20
3 files changed, 171 insertions, 118 deletions
diff --git a/src/Java/gtPlusPlus/core/material/ALLOY.java b/src/Java/gtPlusPlus/core/material/ALLOY.java
index 027cacbc29..1b349b1c3c 100644
--- a/src/Java/gtPlusPlus/core/material/ALLOY.java
+++ b/src/Java/gtPlusPlus/core/material/ALLOY.java
@@ -15,7 +15,7 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{228, 255, 0, 0}, //Material Colour
5660, //Melting Point in C
- 0, //Boiling Point in C
+ 7735, //Boiling Point in C
150, //Protons
80, //Neutrons
true, //Uses Blast furnace?
@@ -47,9 +47,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{68, 75, 66, 0}, //Material Colour
3450, //Melting Point in C
- ((ELEMENT.getInstance().URANIUM238.getBoilingPointC()*9)+(ELEMENT.getInstance().TITANIUM.getBoilingPointC()*1))/10, //Boiling Point in C
- ((ELEMENT.getInstance().URANIUM238.getProtons()*9)+ELEMENT.getInstance().TITANIUM.getProtons())/10, //Protons
- ((ELEMENT.getInstance().URANIUM238.getNeutrons()*9)+ELEMENT.getInstance().TITANIUM.getNeutrons())/10, //Neutrons
+ -1,
+ -1,
+ -1,
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -62,9 +62,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{213, 231, 237, 0}, //Material Colour
3025, //Melting Point in C
- ((ELEMENT.getInstance().TUNGSTEN.getBoilingPointC()*1)+(ELEMENT.getInstance().TANTALUM.getBoilingPointC()*8)+(ELEMENT.getInstance().TITANIUM.getBoilingPointC()*1))/10, //Boiling Point in C
- ((ELEMENT.getInstance().TUNGSTEN.getProtons()*1)+(ELEMENT.getInstance().TANTALUM.getProtons()*8)+(ELEMENT.getInstance().TITANIUM.getProtons()*1))/10, //Protons
- ((ELEMENT.getInstance().TUNGSTEN.getNeutrons()*1)+(ELEMENT.getInstance().TANTALUM.getNeutrons()*8)+(ELEMENT.getInstance().TITANIUM.getNeutrons()*1))/10, //Neutrons
+ -1,
+ -1,
+ -1,
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -77,9 +77,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{193, 211, 217, 0}, //Material Colour
3030, //Melting Point in C
- ((ELEMENT.getInstance().TUNGSTEN.getBoilingPointC()*1)+(ELEMENT.getInstance().TANTALUM.getBoilingPointC()*7)+(ELEMENT.getInstance().TITANIUM.getBoilingPointC()*1)+(ELEMENT.getInstance().YTTRIUM.getBoilingPointC()*1))/10, //Boiling Point in C
- ((ELEMENT.getInstance().TUNGSTEN.getProtons()*1)+(ELEMENT.getInstance().TANTALUM.getProtons()*7)+(ELEMENT.getInstance().TITANIUM.getProtons()*1)+(ELEMENT.getInstance().YTTRIUM.getProtons()*1))/10, //Protons
- ((ELEMENT.getInstance().TUNGSTEN.getNeutrons()*1)+(ELEMENT.getInstance().TANTALUM.getNeutrons()*7)+(ELEMENT.getInstance().TITANIUM.getNeutrons()*1)+(ELEMENT.getInstance().YTTRIUM.getNeutrons()*1))/10, //Neutrons
+ -1,
+ -1,
+ -1,
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -92,10 +92,10 @@ public final class ALLOY {
"Tumbaga", //Material Name
MaterialState.SOLID, //State
new short[]{255,178,15, 0}, //Material Colour
- ((ELEMENT.getInstance().GOLD.getMeltingPointC()*7)+(ELEMENT.getInstance().COPPER.getMeltingPointC()*3))/10, //Melting point in C
- ((ELEMENT.getInstance().GOLD.getBoilingPointC()*7)+(ELEMENT.getInstance().COPPER.getBoilingPointC()*3))/10, //Boiling Point in C
- ((ELEMENT.getInstance().GOLD.getProtons()*7)+(ELEMENT.getInstance().COPPER.getProtons()*3))/10, //Protons
- ((ELEMENT.getInstance().GOLD.getNeutrons()*7)+(ELEMENT.getInstance().COPPER.getNeutrons()*3))/10, //Neutrons
+ -1,
+ -1,
+ -1,
+ -1,
false, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -108,10 +108,10 @@ public final class ALLOY {
"Potin", //Material Name
MaterialState.SOLID, //State
new short[]{201,151,129, 0}, //Material Colour
- ((ELEMENT.getInstance().LEAD.getMeltingPointC()*4)+(ALLOY.BRONZE.getMeltingPointC()*4)+(ELEMENT.getInstance().TIN.getMeltingPointC()*2))/10, //Melting point in C
- ((ELEMENT.getInstance().LEAD.getBoilingPointC()*4)+(ALLOY.BRONZE.getBoilingPointC()*4)+(ELEMENT.getInstance().TIN.getBoilingPointC()*2))/10, //Boiling Point in C
- ((ELEMENT.getInstance().LEAD.getProtons()*4)+(ALLOY.BRONZE.getProtons()*4)+(ELEMENT.getInstance().TIN.getProtons()*2))/10, //Protons
- ((ELEMENT.getInstance().LEAD.getNeutrons()*4)+(ALLOY.BRONZE.getNeutrons()*4)+(ELEMENT.getInstance().TIN.getNeutrons()*2))/10, //Neutrons
+ -1,
+ -1,
+ -1,
+ -1,
false, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -136,9 +136,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{128, 200, 128, 0}, //Material Colour
1425, //Melting Point in C
- ((ELEMENT.getInstance().NICKEL.getBoilingPointC()*6)+(ELEMENT.getInstance().CHROMIUM.getBoilingPointC()*2)+(ELEMENT.getInstance().IRON.getBoilingPointC()*1)+(ELEMENT.getInstance().MOLYBDENUM.getBoilingPointC()*1))/10, //Boiling Point in C
- ((ELEMENT.getInstance().NICKEL.getProtons()*6)+(ELEMENT.getInstance().CHROMIUM.getProtons()*2)+(ELEMENT.getInstance().IRON.getProtons()*1)+(ELEMENT.getInstance().MOLYBDENUM.getProtons()*1))/10, //Protons
- ((ELEMENT.getInstance().NICKEL.getNeutrons()*6)+(ELEMENT.getInstance().CHROMIUM.getNeutrons()*2)+(ELEMENT.getInstance().IRON.getNeutrons()*1)+(ELEMENT.getInstance().MOLYBDENUM.getNeutrons()*1))/10, //Neutrons
+ -1,
+ -1,
+ -1,
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -153,9 +153,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{118, 220, 138, 0}, //Material Colour
1425, //Melting Point in C
- ((ELEMENT.getInstance().NICKEL.getBoilingPointC()*6)+(ELEMENT.getInstance().CHROMIUM.getBoilingPointC()*2)+(ELEMENT.getInstance().NIOBIUM.getBoilingPointC()*1)+(ELEMENT.getInstance().MOLYBDENUM.getBoilingPointC()*1))/10, //Boiling Point in C
- ((ELEMENT.getInstance().NICKEL.getProtons()*6)+(ELEMENT.getInstance().CHROMIUM.getProtons()*2)+(ELEMENT.getInstance().NIOBIUM.getProtons()*1)+(ELEMENT.getInstance().MOLYBDENUM.getProtons()*1))/10, //Protons
- ((ELEMENT.getInstance().NICKEL.getNeutrons()*6)+(ELEMENT.getInstance().CHROMIUM.getNeutrons()*2)+(ELEMENT.getInstance().NIOBIUM.getNeutrons()*1)+(ELEMENT.getInstance().MOLYBDENUM.getNeutrons()*1))/10, //Neutrons
+ -1,
+ -1,
+ -1,
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -170,9 +170,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{108, 240, 118, 0}, //Material Colour
1425, //Melting Point in C
- ((ELEMENT.getInstance().NICKEL.getBoilingPointC()*6)+(ELEMENT.getInstance().CHROMIUM.getBoilingPointC()*1)+(ELEMENT.getInstance().IRON.getBoilingPointC()*1)+(ELEMENT.getInstance().ALUMINIUM.getBoilingPointC()*2))/10, //Boiling Point in C
- ((ELEMENT.getInstance().NICKEL.getProtons()*6)+(ELEMENT.getInstance().CHROMIUM.getProtons()*1)+(ELEMENT.getInstance().IRON.getProtons()*1)+(ELEMENT.getInstance().ALUMINIUM.getProtons()*2))/10, //Protons
- ((ELEMENT.getInstance().NICKEL.getNeutrons()*6)+(ELEMENT.getInstance().CHROMIUM.getNeutrons()*1)+(ELEMENT.getInstance().IRON.getNeutrons()*1)+(ELEMENT.getInstance().ALUMINIUM.getNeutrons()*2))/10, //Neutrons
+ -1,
+ -1,
+ -1,
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -187,10 +187,10 @@ public final class ALLOY {
"Zeron-100", //Material Name
MaterialState.SOLID, //State
new short[]{180, 180, 20, 0}, //Material Colour
- ((ELEMENT.getInstance().CHROMIUM.getMeltingPointC()*25)+(ELEMENT.getInstance().NICKEL.getMeltingPointC()*6)+(ELEMENT.getInstance().COBALT.getMeltingPointC()*9)+(ALLOY.STEEL.getMeltingPointC()*60))/100, //Melting Point in C
- ((ELEMENT.getInstance().CHROMIUM.getBoilingPointC()*25)+(ELEMENT.getInstance().NICKEL.getBoilingPointC()*6)+(ELEMENT.getInstance().COBALT.getBoilingPointC()*9)+(ALLOY.STEEL.getBoilingPointC()*60))/100, //Boiling Point in C
- ((ELEMENT.getInstance().CHROMIUM.getProtons()*25)+(ELEMENT.getInstance().NICKEL.getProtons()*6)+(ELEMENT.getInstance().COBALT.getProtons()*9)+(ALLOY.STEEL.getProtons()*60))/100, //Protons
- ((ELEMENT.getInstance().CHROMIUM.getNeutrons()*25)+(ELEMENT.getInstance().NICKEL.getNeutrons()*6)+(ELEMENT.getInstance().COBALT.getNeutrons()*9)+(ALLOY.STEEL.getNeutrons()*60))/100, //Neutrons
+ -1,
+ -1,
+ -1,
+ -1,
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -207,9 +207,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{140, 140, 140, 0}, //Material Colour
1413, //Melting Point in C
- ((ELEMENT.getInstance().TITANIUM.getBoilingPointC()*5)+(ELEMENT.getInstance().NICKEL.getBoilingPointC()*16)+(ELEMENT.getInstance().COBALT.getBoilingPointC()*9)+(ALLOY.STEEL.getBoilingPointC()*70))/100, //Boiling Point in C
- ((ELEMENT.getInstance().TITANIUM.getProtons()*5)+(ELEMENT.getInstance().NICKEL.getProtons()*16)+(ELEMENT.getInstance().COBALT.getProtons()*9)+(ALLOY.STEEL.getProtons()*70))/100, //Protons
- ((ELEMENT.getInstance().TITANIUM.getNeutrons()*5)+(ELEMENT.getInstance().NICKEL.getNeutrons()*16)+(ELEMENT.getInstance().COBALT.getNeutrons()*9)+(ALLOY.STEEL.getNeutrons()*70))/100, //Neutrons
+ -1,
+ -1,
+ -1,
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -225,9 +225,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{150, 150, 150, 0}, //Material Colour
1413, //Melting Point in C
- ((ELEMENT.getInstance().TITANIUM.getBoilingPointC()*10)+(ELEMENT.getInstance().NICKEL.getBoilingPointC()*21)+(ELEMENT.getInstance().COBALT.getBoilingPointC()*14)+(ALLOY.STEEL.getBoilingPointC()*55))/100, //Boiling Point in C
- ((ELEMENT.getInstance().TITANIUM.getProtons()*10)+(ELEMENT.getInstance().NICKEL.getProtons()*21)+(ELEMENT.getInstance().COBALT.getProtons()*14)+(ALLOY.STEEL.getProtons()*55))/100, //Protons
- ((ELEMENT.getInstance().TITANIUM.getNeutrons()*10)+(ELEMENT.getInstance().NICKEL.getNeutrons()*21)+(ELEMENT.getInstance().COBALT.getNeutrons()*14)+(ALLOY.STEEL.getNeutrons()*55))/100, //Neutrons
+ -1,
+ -1,
+ -1,
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -243,9 +243,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{160, 160, 160, 0}, //Material Colour
1413, //Melting Point in C
- ((ELEMENT.getInstance().TITANIUM.getBoilingPointC()*15)+(ELEMENT.getInstance().NICKEL.getBoilingPointC()*21)+(ELEMENT.getInstance().COBALT.getBoilingPointC()*9)+(ALLOY.STEEL.getBoilingPointC()*55))/100, //Boiling Point in C
- ((ELEMENT.getInstance().TITANIUM.getProtons()*15)+(ELEMENT.getInstance().NICKEL.getProtons()*21)+(ELEMENT.getInstance().COBALT.getProtons()*9)+(ALLOY.STEEL.getProtons()*55))/100, //Protons
- ((ELEMENT.getInstance().TITANIUM.getNeutrons()*15)+(ELEMENT.getInstance().NICKEL.getNeutrons()*21)+(ELEMENT.getInstance().COBALT.getNeutrons()*9)+(ALLOY.STEEL.getNeutrons()*55))/100, //Neutrons
+ -1,
+ -1,
+ -1,
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -261,9 +261,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{129, 75, 120, 0}, //Material Colour
1310, //Melting Point in C
- ((ELEMENT.getInstance().TITANIUM.getBoilingPointC()*10)+(ELEMENT.getInstance().CHROMIUM.getBoilingPointC()*35)+(ELEMENT.getInstance().COBALT.getBoilingPointC()*35)+(ELEMENT.getInstance().MANGANESE.getBoilingPointC()*20))/100, //Boiling Point in C
- ((ELEMENT.getInstance().TITANIUM.getProtons()*10)+(ELEMENT.getInstance().CHROMIUM.getProtons()*35)+(ELEMENT.getInstance().COBALT.getProtons()*35)+(ELEMENT.getInstance().MANGANESE.getProtons()*20))/100, //Protons
- ((ELEMENT.getInstance().TITANIUM.getNeutrons()*10)+(ELEMENT.getInstance().CHROMIUM.getNeutrons()*35)+(ELEMENT.getInstance().COBALT.getNeutrons()*35)+(ELEMENT.getInstance().MANGANESE.getNeutrons()*20))/100, //Neutrons
+ -1,
+ -1,
+ -1,
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -278,9 +278,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{228, 75, 120, 0}, //Material Colour
1454, //Melting Point in C
- ((ELEMENT.getInstance().MOLYBDENUM.getBoilingPointC()*10)+(ELEMENT.getInstance().CHROMIUM.getBoilingPointC()*30)+(ELEMENT.getInstance().COBALT.getBoilingPointC()*40)+(ELEMENT.getInstance().PHOSPHORUS.getBoilingPointC()*20))/100, //Boiling Point in C
- ((ELEMENT.getInstance().MOLYBDENUM.getProtons()*10)+(ELEMENT.getInstance().CHROMIUM.getProtons()*30)+(ELEMENT.getInstance().COBALT.getProtons()*40)+(ELEMENT.getInstance().PHOSPHORUS.getProtons()*20))/100, //Protons
- ((ELEMENT.getInstance().MOLYBDENUM.getNeutrons()*10)+(ELEMENT.getInstance().CHROMIUM.getNeutrons()*30)+(ELEMENT.getInstance().COBALT.getNeutrons()*40)+(ELEMENT.getInstance().PHOSPHORUS.getNeutrons()*20))/100, //Neutrons
+ -1,
+ -1,
+ -1,
false, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -295,9 +295,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{218, 165, 32, 0}, //Material Colour
1350, //Melting Point in C
- ((ELEMENT.getInstance().IRON.getBoilingPointC()*6)+(ELEMENT.getInstance().MOLYBDENUM.getBoilingPointC()*24)+(ELEMENT.getInstance().CHROMIUM.getBoilingPointC()*5)+(ELEMENT.getInstance().NICKEL.getBoilingPointC()*65))/100, //Boiling Point in C
- ((ELEMENT.getInstance().IRON.getProtons()*6)+(ELEMENT.getInstance().MOLYBDENUM.getProtons()*24)+(ELEMENT.getInstance().CHROMIUM.getProtons()*5)+(ELEMENT.getInstance().NICKEL.getProtons()*65))/100, //Protons
- ((ELEMENT.getInstance().IRON.getNeutrons()*6)+(ELEMENT.getInstance().MOLYBDENUM.getNeutrons()*24)+(ELEMENT.getInstance().CHROMIUM.getNeutrons()*5)+(ELEMENT.getInstance().NICKEL.getNeutrons()*65))/100, //Neutrons
+ -1,
+ -1,
+ -1,
false, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -307,30 +307,14 @@ public final class ALLOY {
new MaterialStack(ELEMENT.getInstance().NICKEL, 62)
});
- /*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.getInstance().IRON.getBoilingPoint_C()*18)+(ELEMENT.getInstance().MOLYBDENUM.getBoilingPoint_C()*9)+(ELEMENT.getInstance().CHROMIUM.getBoilingPoint_C()*22)+(ELEMENT.getInstance().NICKEL.getBoilingPoint_C()*51))/100, //Boiling Point in C
- ((ELEMENT.getInstance().IRON.getProtons()*18)+(ELEMENT.getInstance().MOLYBDENUM.getProtons()*9)+(ELEMENT.getInstance().CHROMIUM.getProtons()*22)+(ELEMENT.getInstance().NICKEL.getProtons()*51))/100, //Protons
- ((ELEMENT.getInstance().IRON.getNeutrons()*18)+(ELEMENT.getInstance().MOLYBDENUM.getNeutrons()*9)+(ELEMENT.getInstance().CHROMIUM.getNeutrons()*22)+(ELEMENT.getInstance().NICKEL.getNeutrons()*51))/100, //Neutrons
- false, //Uses Blast furnace?
- //Material Stacks with Percentage of required elements.
- new MaterialStack[]{
- new MaterialStack(ELEMENT.getInstance().IRON, 18),
- new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 9),
- new MaterialStack(ELEMENT.getInstance().CHROMIUM, 22),
- new MaterialStack(ELEMENT.getInstance().NICKEL, 51)
- });*/
-
public static final Material HASTELLOY_X = new Material(
"Hastelloy-X", //Material Name
MaterialState.SOLID, //State
new short[]{255, 193, 37, 0}, //Material Colour
1350, //Melting Point in C
- ((ELEMENT.getInstance().IRON.getBoilingPointC()*18)+(ELEMENT.getInstance().MOLYBDENUM.getBoilingPointC()*9)+(ELEMENT.getInstance().CHROMIUM.getBoilingPointC()*22)+(ELEMENT.getInstance().NICKEL.getBoilingPointC()*51))/100, //Boiling Point in C
- ((ELEMENT.getInstance().IRON.getProtons()*18)+(ELEMENT.getInstance().MOLYBDENUM.getProtons()*9)+(ELEMENT.getInstance().CHROMIUM.getProtons()*22)+(ELEMENT.getInstance().NICKEL.getProtons()*51))/100, //Protons
- ((ELEMENT.getInstance().IRON.getNeutrons()*18)+(ELEMENT.getInstance().MOLYBDENUM.getNeutrons()*9)+(ELEMENT.getInstance().CHROMIUM.getNeutrons()*22)+(ELEMENT.getInstance().NICKEL.getNeutrons()*51))/100, //Neutrons
+ -1,
+ -1,
+ -1,
false, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -345,9 +329,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{236, 213, 48, 0}, //Material Colour
1350, //Melting Point in C
- ((ELEMENT.getInstance().YTTRIUM.getBoilingPointC()*5)+(ELEMENT.getInstance().MOLYBDENUM.getBoilingPointC()*16)+(ELEMENT.getInstance().CHROMIUM.getBoilingPointC()*7)+(ELEMENT.getInstance().NICKEL.getBoilingPointC()*72))/100, //Boiling Point in C
- ((ELEMENT.getInstance().YTTRIUM.getProtons()*5)+(ELEMENT.getInstance().MOLYBDENUM.getProtons()*16)+(ELEMENT.getInstance().CHROMIUM.getProtons()*7)+(ELEMENT.getInstance().NICKEL.getProtons()*72))/100, //Protons
- ((ELEMENT.getInstance().YTTRIUM.getNeutrons()*5)+(ELEMENT.getInstance().MOLYBDENUM.getNeutrons()*16)+(ELEMENT.getInstance().CHROMIUM.getNeutrons()*7)+(ELEMENT.getInstance().NICKEL.getNeutrons()*72))/100, //Neutrons
+ -1,
+ -1,
+ -1,
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -362,9 +346,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{238, 180, 34, 0}, //Material Colour
1350, //Melting Point in C
- ((ELEMENT.getInstance().COBALT.getBoilingPointC()*2)+(ELEMENT.getInstance().MOLYBDENUM.getBoilingPointC()*16)+(ELEMENT.getInstance().CHROMIUM.getBoilingPointC()*16)+(ELEMENT.getInstance().NICKEL.getBoilingPointC()*66))/100, //Boiling Point in C
- ((ELEMENT.getInstance().COBALT.getProtons()*2)+(ELEMENT.getInstance().MOLYBDENUM.getProtons()*16)+(ELEMENT.getInstance().CHROMIUM.getProtons()*16)+(ELEMENT.getInstance().NICKEL.getProtons()*66))/100, //Protons
- ((ELEMENT.getInstance().COBALT.getNeutrons()*2)+(ELEMENT.getInstance().MOLYBDENUM.getNeutrons()*16)+(ELEMENT.getInstance().CHROMIUM.getNeutrons()*16)+(ELEMENT.getInstance().NICKEL.getNeutrons()*66))/100, //Neutrons
+ -1,
+ -1,
+ -1,
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -379,9 +363,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{101, 81, 71, 0}, //Material Colour
1425, //Melting Point in C
- ((ELEMENT.getInstance().IRON.getBoilingPointC()*40)+(ELEMENT.getInstance().COPPER.getBoilingPointC()*4)+(ELEMENT.getInstance().CHROMIUM.getBoilingPointC()*20)+(ELEMENT.getInstance().NICKEL.getBoilingPointC()*36))/100, //Boiling Point in C
- ((ELEMENT.getInstance().IRON.getProtons()*40)+(ELEMENT.getInstance().COPPER.getProtons()*4)+(ELEMENT.getInstance().CHROMIUM.getProtons()*20)+(ELEMENT.getInstance().NICKEL.getProtons()*36))/100, //Protons
- ((ELEMENT.getInstance().IRON.getNeutrons()*40)+(ELEMENT.getInstance().COPPER.getNeutrons()*4)+(ELEMENT.getInstance().CHROMIUM.getNeutrons()*20)+(ELEMENT.getInstance().NICKEL.getNeutrons()*36))/100, //Neutrons
+ -1,
+ -1,
+ -1,
false, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -396,9 +380,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{71, 101, 81, 0}, //Material Colour
1425, //Melting Point in C
- ((ELEMENT.getInstance().IRON.getBoilingPointC()*46)+(ELEMENT.getInstance().COBALT.getBoilingPointC()*18)+(ELEMENT.getInstance().CHROMIUM.getBoilingPointC()*18)+(ELEMENT.getInstance().NICKEL.getBoilingPointC()*18))/100, //Boiling Point in C
- ((ELEMENT.getInstance().IRON.getProtons()*46)+(ELEMENT.getInstance().COBALT.getProtons()*18)+(ELEMENT.getInstance().CHROMIUM.getProtons()*18)+(ELEMENT.getInstance().NICKEL.getProtons()*18))/100, //Protons
- ((ELEMENT.getInstance().IRON.getNeutrons()*46)+(ELEMENT.getInstance().COBALT.getNeutrons()*18)+(ELEMENT.getInstance().CHROMIUM.getNeutrons()*18)+(ELEMENT.getInstance().NICKEL.getNeutrons()*18))/100, //Neutrons
+ -1,
+ -1,
+ -1,
false, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -413,9 +397,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{81, 71, 101, 0}, //Material Colour
1425, //Melting Point in C
- ((ELEMENT.getInstance().IRON.getBoilingPointC()*75)+(ELEMENT.getInstance().ALUMINIUM.getBoilingPointC()*4)+(ELEMENT.getInstance().CHROMIUM.getBoilingPointC()*20)+(ELEMENT.getInstance().YTTRIUM.getBoilingPointC()*1))/100, //Boiling Point in C
- ((ELEMENT.getInstance().IRON.getProtons()*75)+(ELEMENT.getInstance().ALUMINIUM.getProtons()*4)+(ELEMENT.getInstance().CHROMIUM.getProtons()*20)+(ELEMENT.getInstance().YTTRIUM.getProtons()*1))/100, //Protons
- ((ELEMENT.getInstance().IRON.getNeutrons()*75)+(ELEMENT.getInstance().ALUMINIUM.getNeutrons()*4)+(ELEMENT.getInstance().CHROMIUM.getNeutrons()*20)+(ELEMENT.getInstance().YTTRIUM.getNeutrons()*1))/100, //Neutrons
+ -1,
+ -1,
+ -1,
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -430,9 +414,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{44, 44, 44, 0}, //Material Colour
3422, //Melting Point in C
- ((ELEMENT.getInstance().TUNGSTEN.getBoilingPointC()*5)+(ELEMENT.getInstance().CARBON.getBoilingPointC()*5))/10, //Boiling Point in C
- ((ELEMENT.getInstance().TUNGSTEN.getProtons()*5)+(ELEMENT.getInstance().CARBON.getProtons()*5))/10, //Protons
- ((ELEMENT.getInstance().TUNGSTEN.getNeutrons()*5)+(ELEMENT.getInstance().CARBON.getNeutrons()*5))/10, //Neutrons
+ -1,
+ -1,
+ -1,
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -445,9 +429,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{40, 48, 36, 0}, //Material Colour
1414, //Melting Point in C
- ((ELEMENT.getInstance().SILICON.getBoilingPointC()*5)+(ELEMENT.getInstance().CARBON.getBoilingPointC()*5))/10, //Boiling Point in C
- ((ELEMENT.getInstance().SILICON.getProtons()*5)+(ELEMENT.getInstance().CARBON.getProtons()*5))/10, //Protons
- ((ELEMENT.getInstance().SILICON.getNeutrons()*5)+(ELEMENT.getInstance().CARBON.getNeutrons()*5))/10, //Neutrons
+ -1,
+ -1,
+ -1,
false, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -461,9 +445,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{139, 136, 120, 0}, //Material Colour
2980, //Melting Point in C
- ((ELEMENT.getInstance().TANTALUM.getBoilingPointC()*5)+(ELEMENT.getInstance().CARBON.getBoilingPointC()*5))/10, //Boiling Point in C
- ((ELEMENT.getInstance().TANTALUM.getProtons()*5)+(ELEMENT.getInstance().CARBON.getProtons()*5))/10, //Protons
- ((ELEMENT.getInstance().TANTALUM.getNeutrons()*5)+(ELEMENT.getInstance().CARBON.getNeutrons()*5))/10, //Neutrons
+ -1,
+ -1,
+ -1,
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -477,9 +461,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{222, 202, 180, 0}, //Material Colour
1855, //Melting Point in C
- ((ELEMENT.getInstance().ZIRCONIUM.getBoilingPointC()*5)+(ELEMENT.getInstance().CARBON.getBoilingPointC()*5))/10, //Boiling Point in C
- ((ELEMENT.getInstance().ZIRCONIUM.getProtons()*5)+(ELEMENT.getInstance().CARBON.getProtons()*5))/10, //Protons
- ((ELEMENT.getInstance().ZIRCONIUM.getNeutrons()*5)+(ELEMENT.getInstance().CARBON.getNeutrons()*5))/10, //Neutrons
+ -1,
+ -1,
+ -1,
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -493,9 +477,9 @@ public final class ALLOY {
MaterialState.SOLID, //State
new short[]{205, 197, 191, 0}, //Material Colour
2477, //Melting Point in C
- ((ELEMENT.getInstance().NIOBIUM.getBoilingPointC()*5)+(ELEMENT.getInstance().CARBON.getBoilingPointC()*5))/10, //Boiling Point in C
- ((ELEMENT.getInstance().NIOBIUM.getProtons()*5)+(ELEMENT.getInstance().CARBON.getProtons()*5))/10, //Protons
- ((ELEMENT.getInstance().NIOBIUM.getNeutrons()*5)+(ELEMENT.getInstance().CARBON.getNeutrons()*5))/10, //Neutrons
+ -1,
+ -1,
+ -1,
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -508,8 +492,8 @@ public final class ALLOY {
"Grisium", //Material Name
MaterialState.SOLID, //State
new short[]{53, 93, 106, 0}, //Material Colour
- 9001, //Melting Point in C
- 25000, //Boiling Point in C
+ -1, //Melting Point in C
+ -1, //Boiling Point in C
96, //Protons
128, //Neutrons
true, //Uses Blast furnace?
@@ -528,8 +512,8 @@ public final class ALLOY {
new short[]{139,69,19, 0}, //Material Colour
1048, //Melting Point in C
1973, //Boiling Point in C
- ((ALLOY.STEEL.getProtons()*20)+(ELEMENT.getInstance().NICKEL.getProtons()*5)+(ELEMENT.getInstance().SILICON.getProtons()*1)+(ELEMENT.getInstance().ALUMINIUM.getProtons()*4))/30, //Protons
- ((ALLOY.STEEL.getNeutrons()*20)+(ELEMENT.getInstance().NICKEL.getNeutrons()*5)+(ELEMENT.getInstance().SILICON.getNeutrons()*1)+(ELEMENT.getInstance().ALUMINIUM.getNeutrons()*4))/30, //Neutrons
+ -1,
+ -1,
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java
index d20d1634f9..b5fd2da087 100644
--- a/src/Java/gtPlusPlus/core/material/Material.java
+++ b/src/Java/gtPlusPlus/core/material/Material.java
@@ -79,17 +79,47 @@ public class Material {
this.localizedName = materialName;
this.materialState = defaultState;
this.RGBA = rgba;
- this.meltingPointC = meltingPoint;
- if (boilingPoint != 0){
- this.boilingPointC = boilingPoint;
+
+
+ //Set Melting/Boiling point, if value is -1 calculate it from compound inputs.
+ if (meltingPoint != -1){
+ this.meltingPointC = meltingPoint;
}
else {
- this.boilingPointC = meltingPoint*4;
+ this.meltingPointC = this.calculateMeltingPoint();
}
+ if (boilingPoint != -1){
+ if (boilingPoint != 0){
+ this.boilingPointC = boilingPoint;
+ }
+ else {
+ this.boilingPointC = meltingPoint*4;
+ }
+ }
+ else {
+ this.boilingPointC = this.calculateMeltingPoint();
+ }
+
this.meltingPointK = (int) MathUtils.celsiusToKelvin(this.meltingPointC);
this.boilingPointK = (int) MathUtils.celsiusToKelvin(this.boilingPointC);
- this.vProtons = protons;
- this.vNeutrons = neutrons;
+
+ //Set Proton/Neutron count, if value is -1 calculate it from compound inputs.
+ if (protons != -1){
+ this.vProtons = protons;
+ }
+ else {
+ this.vProtons = this.calculateProtons();
+ }
+ if (boilingPoint != -1){
+ this.vNeutrons = neutrons;
+ }
+ else {
+ this.vNeutrons = this.calculateNeutrons();
+ }
+
+
+
+
this.vMass = this.getMass();
//Sets tool Durability
@@ -634,6 +664,45 @@ public class Material {
}
+ final public int calculateMeltingPoint(){
+ int meltingPoint = 0;
+ for (MaterialStack part : this.vMaterialInput){
+ meltingPoint = (meltingPoint+part.getStackMaterial().getMeltingPointC());
+ }
+ int divisor = (this.vMaterialInput.size()>0 ? this.vMaterialInput.size() : 1);
+ meltingPoint = (meltingPoint/divisor);
+ return meltingPoint;
+ }
+
+ final public int calculateBoilingPoint(){
+ int boilingPoint = 0;
+ for (MaterialStack part : this.vMaterialInput){
+ boilingPoint = (boilingPoint+part.getStackMaterial().getBoilingPointC());
+ }
+ int divisor = (this.vMaterialInput.size()>0 ? this.vMaterialInput.size() : 1);
+ boilingPoint = (boilingPoint/divisor);
+ return boilingPoint;
+ }
+
+ final public long calculateProtons(){
+ long protonCount = 0;
+ for (MaterialStack part : this.vMaterialInput){
+ protonCount = (protonCount+part.getStackMaterial().getProtons());
+ }
+ int divisor = (this.vMaterialInput.size()>0 ? this.vMaterialInput.size() : 1);
+ protonCount = (protonCount/divisor);
+ return protonCount;
+ }
+
+ final public long calculateNeutrons(){
+ long neutronCount = 0;
+ for (MaterialStack part : this.vMaterialInput){
+ neutronCount = (neutronCount+part.getStackMaterial().getNeutrons());
+ }
+ int divisor = (this.vMaterialInput.size()>0 ? this.vMaterialInput.size() : 1);
+ neutronCount = (neutronCount/divisor);
+ return neutronCount;
+ }
diff --git a/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java b/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java
index 4edd696ecc..eff0016f8e 100644
--- a/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java
+++ b/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java
@@ -146,34 +146,34 @@ public class MaterialUtils {
}
public static int getTierOfMaterial(final int M){
- if ((M >= 0) && (M <= 750)){
+ if ((M >= 0) && (M <= 1000)){
return 1;
}
- else if((M >= 751) && (M <= 1250)){
+ else if((M >= 1001) && (M <= 2000)){
return 2;
}
- else if((M >= 1251) && (M <= 1750)){
+ else if((M >= 2001) && (M <= 3000)){
return 3;
}
- else if((M >= 1751) && (M <= 2250)){
+ else if((M >= 3001) && (M <= 4000)){
return 4;
}
- else if((M >= 2251) && (M <= 2750)){
+ else if((M >= 4001) && (M <= 5000)){
return 5;
}
- else if((M >= 2751) && (M <= 3250)){
+ else if((M >= 5001) && (M <= 6000)){
return 6;
}
- else if((M >= 3251) && (M <= 3750)){
+ else if((M >= 6001) && (M <= 7000)){
return 7;
}
- else if((M >= 3751) && (M <= 4250)){
+ else if((M >= 7001) && (M <= 8000)){
return 8;
}
- else if((M >= 4251) && (M <= 4750)){
+ else if((M >= 8001) && (M <= 9000)){
return 9;
}
- else if((M >= 4751) && (M <= 9999)){
+ else if((M >= 9001) && (M <= 9999)){
return 10;
}
else {