aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api
diff options
context:
space:
mode:
authorTechnus <daniel112092@gmail.com>2016-09-05 12:46:04 +0200
committerTechnus <daniel112092@gmail.com>2016-09-21 21:50:43 +0200
commit803c0e2bc67510b331d213624318cc8d9d0faceb (patch)
tree10276e5fd71d4a2b2dccc1c61dcc19b08714d478 /src/main/java/gregtech/api
parent0a04741a6050fd4976565da1a16aeb257c73ecd0 (diff)
downloadGT5-Unofficial-803c0e2bc67510b331d213624318cc8d9d0faceb.tar.gz
GT5-Unofficial-803c0e2bc67510b331d213624318cc8d9d0faceb.tar.bz2
GT5-Unofficial-803c0e2bc67510b331d213624318cc8d9d0faceb.zip
Initial material change and tier expansion.
Diffstat (limited to 'src/main/java/gregtech/api')
-rw-r--r--src/main/java/gregtech/api/enums/GT_Values.java16
-rw-r--r--src/main/java/gregtech/api/enums/ItemList.java2
-rw-r--r--src/main/java/gregtech/api/enums/Materials.java40
-rw-r--r--src/main/java/gregtech/api/enums/Tier.java16
-rw-r--r--src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java21
-rw-r--r--src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java21
-rw-r--r--src/main/java/gregtech/api/metatileentity/MetaTileEntity.java21
-rw-r--r--src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java8
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java49
9 files changed, 151 insertions, 43 deletions
diff --git a/src/main/java/gregtech/api/enums/GT_Values.java b/src/main/java/gregtech/api/enums/GT_Values.java
index c459be5f4d..deee4e32d0 100644
--- a/src/main/java/gregtech/api/enums/GT_Values.java
+++ b/src/main/java/gregtech/api/enums/GT_Values.java
@@ -62,12 +62,20 @@ public class GT_Values {
* The Voltage Tiers. Use this Array instead of the old named Voltage Variables
*/
public static final long[] V = new long[]{8L, 32L, 128L, 512L, 2048L, 8192L, 32768L, 131072L, 524288L, 2097152L, 8388608L, 33554432L, 134217728L, 536870912L, 1073741824L, Integer.MAX_VALUE-7};
+ //TODO:Adding that in coremod!!!
//TODO:tier 14,15 wires and transformers only (not even cables !!!)
- //TODO:tier 12,13 the above + batteries, battery buffers
- //TODO:tier 10,11 the above + charger other machines
- //TODO:tier 9 machines
- //TODO:AND ALL THE MATERIALS...
+ //TODO:tier 12,13 the above + batteries, battery buffers, (maybe cables)
+ //TODO:tier 10,11 the above + chargers and other machines, (cables would be nice)
+ //TODO:tier 9 machines and batteries
+ //TODO:AND ALL THE MATERIALS... for that
+ //TODO:LIST OF MACHINES WITH POINTLESS TIERS (unless you implement some other tiering mechanism like reducing eu cost if time=1tick)
+ //Macerator/Compressor/Furnace... and for cheap recipes any
+ /**
+ * keeping Voltage*Amps < Integer.MAX_VALUE-7 for machines (and tier logic 4x EUt 2/ time)
+ * AMV[4]= max amps at tier 4
+ */
+ public static final long[] AatV = new long[]{268435455,67108863,16777215,4194303,1048575,262143,65535,16383,4095,1023,255,63,15,3,1,1};
/**
* The short Names for the Voltages
*/
diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java
index 48c24082be..6b1b436c4c 100644
--- a/src/main/java/gregtech/api/enums/ItemList.java
+++ b/src/main/java/gregtech/api/enums/ItemList.java
@@ -631,7 +631,7 @@ public enum ItemList implements IItemContainer {
MagicEnergyAbsorber_LV, MagicEnergyAbsorber_MV, MagicEnergyAbsorber_HV, MagicEnergyAbsorber_EV,
Depleted_Thorium_1, Depleted_Thorium_2, Depleted_Thorium_4,
Processing_Array, Distillation_Tower, Energy_LapotronicOrb2,
- ZPM2, Quantum_Tank_LV, Quantum_Tank_MV, Quantum_Tank_HV, Quantum_Tank_EV, Quantum_Tank_IV, Quantum_Chest_LV, Quantum_Chest_MV, Quantum_Chest_HV, Quantum_Chest_EV, Quantum_Chest_IV,
+ ZPM3,ZPM2, Quantum_Tank_LV, Quantum_Tank_MV, Quantum_Tank_HV, Quantum_Tank_EV, Quantum_Tank_IV, Quantum_Chest_LV, Quantum_Chest_MV, Quantum_Chest_HV, Quantum_Chest_EV, Quantum_Chest_IV,
NULL, Cover_RedstoneTransmitterExternal, Cover_RedstoneTransmitterInternal, Cover_RedstoneReceiverExternal, Cover_RedstoneReceiverInternal,
LargeSteamTurbine, LargeGasTurbine, LargeHPSteamTurbine, LargePlasmaTurbine,
diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java
index e755fd37cb..b68ead1cbc 100644
--- a/src/main/java/gregtech/api/enums/Materials.java
+++ b/src/main/java/gregtech/api/enums/Materials.java
@@ -104,13 +104,13 @@ public enum Materials implements IColorModulationContainer, ISubTagContainer {
Tantalum ( 80, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Tantalum" , 0, 0, 3290, 0, false, false, 4, 1, 1, Dyes._NULL , Element.Ta , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.VINCULUM, 1))),
Tellurium ( 59, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Tellurium" , 0, 0, 722, 0, false, false, 4, 1, 1, Dyes.dyeGray , Element.Te , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
Terbium ( 72, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Terbium" , 0, 0, 1629, 1629, true, false, 4, 1, 1, Dyes._NULL , Element.Tb , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
- Thaumium ( 330, TextureSet.SET_METALLIC , 12.0F, 256, 3, 1|2 |64|128 , 150, 100, 200, 0, "Thaumium" , 0, 0, -1, 0, false, false, 5, 2, 1, Dyes.dyePurple , 0 , Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))),
+ Thaumium ( 330, TextureSet.SET_METALLIC , 12.0F, 256, 3, 1|2 |64|128 , 150, 100, 200, 0, "Thaumium" , 0, 0, -1, 0, false, false, 5, 2, 1, Dyes.dyePurple , 0, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))),
Thorium ( 96, TextureSet.SET_SHINY , 6.0F, 512, 2, 1|2 |8 |32|64 , 0, 30, 0, 0, "Thorium" , 0, 0, 2115, 0, false, false, 4, 1, 1, Dyes.dyeBlack , Element.Th , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
Thulium ( 76, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Thulium" , 0, 0, 1818, 1818, true, false, 4, 1, 1, Dyes._NULL , Element.Tm , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
Tin ( 57, TextureSet.SET_DULL , 1.0F, 0, 1, 1|2 |8 |32 |128 , 220, 220, 220, 0, "Tin" , 0, 0, 505, 505, false, false, 3, 1, 1, Dyes.dyeWhite , Element.Sn , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.VITREUS, 1))),
- Titanium ( 28, TextureSet.SET_METALLIC , 7.0F, 1600, 3, 1|2 |8 |32|64|128 , 220, 160, 240, 0, "Titanium" , 0, 0, 1941, 1940, true, false, 5, 1, 1, Dyes.dyePurple , Element.Ti , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.TUTAMEN, 1))),
- Tritium ( 3, TextureSet.SET_METALLIC , 1.0F, 0, 2, 16|32 , 255, 0, 0, 240, "Tritium" , 0, 0, 14, 0, false, true, 10, 1, 1, Dyes.dyeRed , Element.T , Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 4))),
- Tungsten ( 81, TextureSet.SET_METALLIC , 7.0F, 2560, 3, 1|2 |8 |32|64|128 , 50, 50, 50, 0, "Tungsten" , 0, 0, 3695, 3000, true, false, 4, 1, 1, Dyes.dyeBlack , Element.W , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 3), new TC_AspectStack(TC_Aspects.TUTAMEN, 1))),
+ Titanium ( 28, TextureSet.SET_METALLIC , 7.0F, 1600, 3, 1|2 |8 |32|64|128 , 220, 160, 240, 0, "Titanium" , 0, 0, 1941, 1940, true, false, 5, 1, 1, Dyes.dyePurple , Element.Ti , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.TUTAMEN, 1))),
+ Tritium ( 3, TextureSet.SET_METALLIC , 1.0F, 0, 2, 16|32 , 255, 0, 0, 240, "Tritium" , 0, 0, 14, 0, false, true, 10, 1, 1, Dyes.dyeRed , Element.T , Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 4))),
+ Tungsten ( 81, TextureSet.SET_METALLIC , 7.0F, 2560, 3, 1|2 |8 |32|64|128 , 50, 50, 50, 0, "Tungsten" , 0, 0, 3695, 3000, true, false, 4, 1, 1, Dyes.dyeBlack , Element.W , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 3), new TC_AspectStack(TC_Aspects.TUTAMEN, 1))),
Uranium ( 98, TextureSet.SET_METALLIC , 6.0F, 512, 3, 1|2 |8 |32|64 , 50, 240, 50, 0, "Uranium 238" , 0, 0, 1405, 0, false, false, 4, 1, 1, Dyes.dyeGreen , Element.U , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
Uranium235 ( 97, TextureSet.SET_SHINY , 6.0F, 512, 3, 1|2 |8 |32|64 , 70, 250, 70, 0, "Uranium 235" , 0, 0, 1405, 0, false, false, 4, 1, 1, Dyes.dyeGreen , Element.U_235 , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 2))),
Vanadium ( 29, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 50, 50, 50, 0, "Vanadium" , 0, 0, 2183, 2183, true, false, 2, 1, 1, Dyes.dyeBlack , Element.V , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))),
@@ -662,21 +662,31 @@ public enum Materials implements IColorModulationContainer, ISubTagContainer {
/**
* Galaxy Space 1.10 compat from Version 2.6
*/
- Ledox ( 390, TextureSet.SET_SHINY , 15.0F, 1024, 4, 1|2 |8|16|32|64|128 , 0, 116, 255, 0, "Ledox" , 0, 0, -1, 0, false, false, 4, 1, 1, Dyes.dyeBlue),
- Quantium ( 391, TextureSet.SET_SHINY , 18.0F, 2048, 4, 1|2 |8|16|32|64|128 , 0, 209, 11, 0, "Quantium" , 0, 0, 4000, 4000, true, false, 4, 1, 1, Dyes.dyeLime),
- Mytryl ( 387, TextureSet.SET_SHINY , 8.0F, 512, 4, 1|2 |8|16|32|64|128 , 242, 100, 4, 0, "Mytryl" , 0, 0, 3600, 3600, true, false, 4, 1, 1, Dyes.dyeOrange),
- BlackPlutonium ( 388, TextureSet.SET_DULL , 36.0F, 8192, 6, 1|2 |8|16|32|64|128 , 50, 50, 50, 0, "Black Plutonium" , 0, 0, 9000, 9000, true, false, 4, 1, 1, Dyes.dyeBlack),
- CallistoIce ( 389, TextureSet.SET_SHINY , 9.0F, 1024, 4, 1|2 |8|16|32|64|128 , 30, 177, 255, 0, "Callisto Ice" , 0, 0, -1, 0, false, false, 4, 1, 1, Dyes.dyeLightBlue),
- Duralumin ( 392, TextureSet.SET_SHINY , 16.0F, 512, 3, 1|2 |8|16|32|64|128 , 235, 209, 160, 0, "Duralumin" , 0, 0, 1600, 1600, true, false, 4, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Aluminium, 1), new MaterialStack(Bronze, 1))),
- Oriharukon ( 393, TextureSet.SET_SHINY , 32.0F, 10240, 5, 1|2 |8|16|32|64|128 , 103, 125, 104, 0, "Oriharukon" , 0, 0, 5400, 5400, true, false, 4, 1, 1, Dyes.dyeLime),
- InfinityCatalyst ( 394, TextureSet.SET_SHINY , 64.0F,1310720, 7, 1 |16|32 , 200, 200, 200, 0, "Infinity Catalyst" , 5, 500000, 9000, 9000, true, false, 4, 1, 1, Dyes.dyeLightGray),
- Infinity ( 395, TextureSet.SET_SHINY , 128.0F,2621440, 8, 1 |16|32 , 255, 255, 255, 0, "Infinity" , 5, 5000000, 9000, 9000, true, false, 4, 1, 1, Dyes.dyeWhite),
- Bedrockium ( 397, TextureSet.SET_SHINY , 54.0F, 327680, 6, 1 |16|32 , 50, 50, 50, 0, "Bedrockium" , 0, 0, 9000, 9000, true, false, 4, 1, 1, Dyes.dyeBlack),
-
+ Ledox ( 390, TextureSet.SET_SHINY , 15.0F, 1024, 4, 1|2 |8 |64|128 , 0, 116, 255, 0, "Ledox" , 0, 0, -1, 0, false, false, 4, 1, 1, Dyes.dyeBlue),
+ Quantium ( 391, TextureSet.SET_SHINY , 18.0F, 2048, 4, 1|2 |8 |64|128 , 0, 209, 11, 0, "Quantium" , 0, 0, 4000, 4000, true, false, 4, 1, 1, Dyes.dyeLime),
+ Mytryl ( 387, TextureSet.SET_SHINY , 8.0F, 512, 4, 1|2 |8 |64|128 , 242, 100, 4, 0, "Mytryl" , 0, 0, 3600, 3600, true, false, 4, 1, 1, Dyes.dyeOrange),
+ BlackPlutonium ( 388, TextureSet.SET_DULL , 36.0F, 8192, 6, 1|2 |8 |64|128 , 50, 50, 50, 0, "Black Plutonium" , 0, 0, 9000, 9000, true, false, 4, 1, 1, Dyes.dyeBlack),
+ CallistoIce ( 389, TextureSet.SET_SHINY , 9.0F, 1024, 4, 1|2 |8 |64|128 , 30, 177, 255, 0, "Callisto Ice" , 0, 0, -1, 0, false, false, 4, 1, 1, Dyes.dyeLightBlue),
+ Duralumin ( 392, TextureSet.SET_SHINY , 16.0F, 512, 3, 1|2 |8 |64|128 , 235, 209, 160, 0, "Duralumin" , 0, 0, 1600, 1600, true, false, 4, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Aluminium, 1), new MaterialStack(Bronze, 1))),
+ Oriharukon ( 393, TextureSet.SET_SHINY , 32.0F, 10240, 5, 1|2 |8 |64|128 , 103, 125, 104, 0, "Oriharukon" , 0, 0, 5400, 5400, true, false, 4, 1, 1, Dyes.dyeLime),
+ /**
+ * Op materials (draconic evolution above)
+ */
+ //TODO: ADD, INFINITY (metal) with all things, and things add stuff to bedrockium (draconium and awoken draconium)
+ //TODO: add other op materials? maybe some new ores or new only fusion made op materials from op materials??? like neutronium bedrockium alloy etc.
+ InfinityCatalyst ( 394, TextureSet.SET_SHINY , 64.0F,1310720, 7, 1 , 255, 255, 255, 0, "Infinity Catalyst" , 0, 0, 9000, 9000, true, false, 4, 1, 1, Dyes.dyeWhite),
+ Bedrockium ( 395, TextureSet.SET_SHINY , 54.0F, 327680, 6, 1 , 50, 50, 50, 0, "Bedrockium" , 0, 0, 9000, 9000, true, false, 4, 1, 1, Dyes.dyeBlack),
+ //Infinity
+ //Others, new ones?...
/**
* Materials which are renamed automatically
*/
+ //@Deprecated Duralium (Duralumin,false),
+ //@Deprecated Dural (Duralumin,false),
+ //@Deprecated Duralum (Duralumin,false),
+ //@Deprecated Duraluminium (Duralumin,false),
+ //@Deprecated Duraluminum (Duralumin,false),
@Deprecated IridiumAndSodiumOxide(IridiumSodiumOxide, false),
@Deprecated Palygorskite (FullersEarth, false),
@Deprecated Adamantine (Adamantium, true),
diff --git a/src/main/java/gregtech/api/enums/Tier.java b/src/main/java/gregtech/api/enums/Tier.java
index 265d2866ab..20591505d9 100644
--- a/src/main/java/gregtech/api/enums/Tier.java
+++ b/src/main/java/gregtech/api/enums/Tier.java
@@ -14,8 +14,16 @@ public class Tier {
new Tier(SubTag.ENERGY_ELECTRICITY, 5, 8192, 1, 1, 1, Materials.TungstenSteel, ItemList.Hull_IV, OrePrefixes.cableGt01.get(Materials.Platinum), OrePrefixes.cableGt04.get(Materials.Platinum), OrePrefixes.circuit.get(Materials.Master), OrePrefixes.circuit.get(Materials.Ultimate)),
new Tier(SubTag.ENERGY_ELECTRICITY, 6, 32768, 1, 1, 1, Materials.Chrome, ItemList.Hull_LuV, OrePrefixes.cableGt01.get(Materials.NiobiumTitanium), OrePrefixes.cableGt04.get(Materials.NiobiumTitanium), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)),
new Tier(SubTag.ENERGY_ELECTRICITY, 7, 131072, 1, 1, 1, Materials.Iridium, ItemList.Hull_ZPM, OrePrefixes.cableGt01.get(Materials.Naquadah), OrePrefixes.cableGt04.get(Materials.Naquadah), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)),
- new Tier(SubTag.ENERGY_ELECTRICITY, 8, 524288, 1, 1, 1, Materials.Osmium, ItemList.Hull_UV, OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), OrePrefixes.cableGt01.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)),
- new Tier(SubTag.ENERGY_ELECTRICITY, 9, Integer.MAX_VALUE, 1, 1, 1, Materials.Neutronium, ItemList.Hull_MAX, OrePrefixes.wireGt01.get(Materials.Superconductor), OrePrefixes.wireGt04.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)),
+ new Tier(SubTag.ENERGY_ELECTRICITY, 8, 524288, 1, 1, 1, Materials.Osmium, ItemList.Hull_UV, OrePrefixes.cableGt04.get(Materials.NaquadahAlloy), OrePrefixes.wireGt01.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)),
+ new Tier(SubTag.ENERGY_ELECTRICITY, 9, 2097152, 1, 1, 1, Materials.Neutronium, ItemList.Hull_MAX, OrePrefixes.wireGt01.get(Materials.Superconductor), OrePrefixes.wireGt04.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)),
+ new Tier(SubTag.ENERGY_ELECTRICITY,10, 8388608, 1, 1, 1, Materials.Neutronium, ItemList.Hull_MAX, OrePrefixes.wireGt01.get(Materials.Superconductor), OrePrefixes.wireGt04.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)),
+ new Tier(SubTag.ENERGY_ELECTRICITY,11, 33554432, 1, 1, 1, Materials.Neutronium, ItemList.Hull_MAX, OrePrefixes.wireGt01.get(Materials.Superconductor), OrePrefixes.wireGt04.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)),
+ new Tier(SubTag.ENERGY_ELECTRICITY,12, 134217728, 1, 1, 1, Materials.Neutronium, ItemList.Hull_MAX, OrePrefixes.wireGt01.get(Materials.Superconductor), OrePrefixes.wireGt04.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)),
+ new Tier(SubTag.ENERGY_ELECTRICITY,13, 536870912, 1, 1, 1, Materials.Neutronium, ItemList.Hull_MAX, OrePrefixes.wireGt01.get(Materials.Superconductor), OrePrefixes.wireGt04.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)),
+ new Tier(SubTag.ENERGY_ELECTRICITY,14, 1073741824, 1, 1, 1, Materials.Neutronium, ItemList.Hull_MAX, OrePrefixes.wireGt01.get(Materials.Superconductor), OrePrefixes.wireGt04.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)),
+ new Tier(SubTag.ENERGY_ELECTRICITY,15, Integer.MAX_VALUE-7, 1, 1, 1, Materials.Neutronium, ItemList.Hull_MAX, OrePrefixes.wireGt01.get(Materials.Superconductor), OrePrefixes.wireGt04.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)),
+ //READ GT_VALUES CLASS BEFORE YOU START ADDING STUFF TO TIERS 8+ - and probably dont do it in GT but in GTNH core mod - that way we shouldnt need to set the tier class
+ //TODO:test if that above actually works as intended (tier class should be ignored) when adding stuff with coremod
}, ROTATIONAL = new Tier[]{
new Tier(SubTag.ENERGY_ROTATIONAL, 1, 32, 1, 1, 1, Materials.Wood, OrePrefixes.frameGt.get(Materials.Wood), OrePrefixes.stick.get(Materials.Wood), OrePrefixes.ingot.get(Materials.Wood), OrePrefixes.gearGt.get(Materials.Wood), OrePrefixes.gearGt.get(Materials.Stone)),
new Tier(SubTag.ENERGY_ROTATIONAL, 1, 32, 1, 2, 2, Materials.WoodSealed, OrePrefixes.frameGt.get(Materials.WoodSealed), OrePrefixes.stick.get(Materials.WoodSealed), OrePrefixes.ingot.get(Materials.WoodSealed), OrePrefixes.gearGt.get(Materials.WoodSealed), OrePrefixes.gearGt.get(Materials.Stone)),
@@ -27,14 +35,14 @@ public class Tier {
new Tier(SubTag.ENERGY_ROTATIONAL, 4, 2048, 1, 2, 2, Materials.Titanium, OrePrefixes.frameGt.get(Materials.Titanium), OrePrefixes.stick.get(Materials.Titanium), OrePrefixes.ingot.get(Materials.Titanium), OrePrefixes.gearGt.get(Materials.Titanium), OrePrefixes.gearGt.get(Materials.TungstenSteel)),
new Tier(SubTag.ENERGY_ROTATIONAL, 5, 8192, 1, 1, 1, Materials.TungstenSteel, OrePrefixes.frameGt.get(Materials.TungstenSteel), OrePrefixes.stick.get(Materials.TungstenSteel), OrePrefixes.ingot.get(Materials.TungstenSteel), OrePrefixes.gearGt.get(Materials.TungstenSteel), OrePrefixes.gearGt.get(Materials.Iridium)),
new Tier(SubTag.ENERGY_ROTATIONAL, 6, 32768, 1, 1, 1, Materials.Iridium, OrePrefixes.frameGt.get(Materials.Iridium), OrePrefixes.stick.get(Materials.Iridium), OrePrefixes.ingot.get(Materials.Iridium), OrePrefixes.gearGt.get(Materials.Iridium), OrePrefixes.gearGt.get(Materials.Neutronium)),
- new Tier(SubTag.ENERGY_ROTATIONAL, 9, Integer.MAX_VALUE, 1, 1, 1, Materials.Neutronium, OrePrefixes.frameGt.get(Materials.Neutronium), OrePrefixes.stick.get(Materials.Neutronium), OrePrefixes.ingot.get(Materials.Neutronium), OrePrefixes.gearGt.get(Materials.Neutronium), OrePrefixes.gearGt.get(Materials.Neutronium)),
+ new Tier(SubTag.ENERGY_ROTATIONAL, 9, Integer.MAX_VALUE-7, 1, 1, 1, Materials.Neutronium, OrePrefixes.frameGt.get(Materials.Neutronium), OrePrefixes.stick.get(Materials.Neutronium), OrePrefixes.ingot.get(Materials.Neutronium), OrePrefixes.gearGt.get(Materials.Neutronium), OrePrefixes.gearGt.get(Materials.Neutronium)),
}, STEAM = new Tier[]{
new Tier(SubTag.ENERGY_STEAM, 1, 32, 1, 1, 1, Materials.Bronze, OrePrefixes.frameGt.get(Materials.Bronze), OrePrefixes.pipeMedium.get(Materials.Bronze), OrePrefixes.pipeHuge.get(Materials.Bronze), OrePrefixes.pipeMedium.get(Materials.Bronze), OrePrefixes.pipeLarge.get(Materials.Bronze)),
new Tier(SubTag.ENERGY_STEAM, 2, 128, 1, 1, 1, Materials.Steel, OrePrefixes.frameGt.get(Materials.Steel), OrePrefixes.pipeMedium.get(Materials.Steel), OrePrefixes.pipeHuge.get(Materials.Steel), OrePrefixes.pipeMedium.get(Materials.Steel), OrePrefixes.pipeLarge.get(Materials.Steel)),
new Tier(SubTag.ENERGY_STEAM, 3, 512, 1, 1, 1, Materials.Titanium, OrePrefixes.frameGt.get(Materials.Titanium), OrePrefixes.pipeMedium.get(Materials.Titanium), OrePrefixes.pipeHuge.get(Materials.Titanium), OrePrefixes.pipeMedium.get(Materials.Titanium), OrePrefixes.pipeLarge.get(Materials.Titanium)),
new Tier(SubTag.ENERGY_STEAM, 4, 2048, 1, 1, 1, Materials.TungstenSteel, OrePrefixes.frameGt.get(Materials.TungstenSteel), OrePrefixes.pipeMedium.get(Materials.TungstenSteel), OrePrefixes.pipeHuge.get(Materials.TungstenSteel), OrePrefixes.pipeMedium.get(Materials.TungstenSteel), OrePrefixes.pipeLarge.get(Materials.TungstenSteel)),
new Tier(SubTag.ENERGY_STEAM, 5, 8192, 1, 1, 1, Materials.Iridium, OrePrefixes.frameGt.get(Materials.Iridium), OrePrefixes.pipeMedium.get(Materials.Iridium), OrePrefixes.pipeHuge.get(Materials.Iridium), OrePrefixes.pipeMedium.get(Materials.Iridium), OrePrefixes.pipeLarge.get(Materials.Iridium)),
- new Tier(SubTag.ENERGY_STEAM, 9, Integer.MAX_VALUE, 1, 1, 1, Materials.Neutronium, OrePrefixes.frameGt.get(Materials.Neutronium), OrePrefixes.pipeMedium.get(Materials.Neutronium), OrePrefixes.pipeHuge.get(Materials.Neutronium), OrePrefixes.pipeMedium.get(Materials.Neutronium), OrePrefixes.pipeLarge.get(Materials.Neutronium)),
+ new Tier(SubTag.ENERGY_STEAM, 9, Integer.MAX_VALUE-7, 1, 1, 1, Materials.Neutronium, OrePrefixes.frameGt.get(Materials.Neutronium), OrePrefixes.pipeMedium.get(Materials.Neutronium), OrePrefixes.pipeHuge.get(Materials.Neutronium), OrePrefixes.pipeMedium.get(Materials.Neutronium), OrePrefixes.pipeLarge.get(Materials.Neutronium)),
};
/**
* Used for Crafting Recipes
diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java
index b62ed4500b..ba9ecedb35 100644
--- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java
+++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java
@@ -79,7 +79,26 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd
if (GregTech_API.mRFExplosions && GregTech_API.sMachineExplosions && ((IEnergyReceiver) tTileEntity).getMaxEnergyStored(tDirection) < rfOut * 600) {
if (rfOut > 32 * GregTech_API.mEUtoRF / 100) {
int aExplosionPower = rfOut;
- float tStrength = aExplosionPower < V[0] ? 1.0F : aExplosionPower < V[1] ? 2.0F : aExplosionPower < V[2] ? 3.0F : aExplosionPower < V[3] ? 4.0F : aExplosionPower < V[4] ? 5.0F : aExplosionPower < V[4] * 2 ? 6.0F : aExplosionPower < V[5] ? 7.0F : aExplosionPower < V[6] ? 8.0F : aExplosionPower < V[7] ? 9.0F : 10.0F;
+ float tStrength =
+ aExplosionPower < V[0] ? 1.0F :
+ aExplosionPower < V[1] ? 2.0F :
+ aExplosionPower < V[2] ? 3.0F :
+ aExplosionPower < V[3] ? 4.0F :
+ aExplosionPower < V[4] ? 5.0F :
+ aExplosionPower < V[4] * 2 ? 6.0F :
+ aExplosionPower < V[5] ? 7.0F :
+ aExplosionPower < V[6] ? 8.0F :
+ aExplosionPower < V[7] ? 9.0F :
+ aExplosionPower < V[8] ? 10.0F :
+ aExplosionPower < V[8] * 2 ? 11.0F :
+ aExplosionPower < V[9] ? 12.0F :
+ aExplosionPower < V[10] ? 13.0F :
+ aExplosionPower < V[11] ? 14.0F :
+ aExplosionPower < V[12] ? 15.0F :
+ aExplosionPower < V[12] * 2 ? 16.0F :
+ aExplosionPower < V[13] ? 17.0F :
+ aExplosionPower < V[14] ? 18.0F :
+ aExplosionPower < V[15] ? 19.0F : 20.0F;
int tX = tTileEntity.xCoord, tY = tTileEntity.yCoord, tZ = tTileEntity.zCoord;
World tWorld = tTileEntity.getWorldObj();
GT_Utility.sendSoundToPlayers(tWorld, GregTech_API.sSoundList.get(209), 1.0F, -1, tX, tY, tZ);
diff --git a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java
index 05c9c1b5b6..8f2b81b4de 100644
--- a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java
@@ -639,7 +639,26 @@ public abstract class MetaPipeEntity implements IMetaTileEntity {
@Override
public void doExplosion(long aExplosionPower) {
- float tStrength = aExplosionPower < V[0] ? 1.0F : aExplosionPower < V[1] ? 2.0F : aExplosionPower < V[2] ? 3.0F : aExplosionPower < V[3] ? 4.0F : aExplosionPower < V[4] ? 5.0F : aExplosionPower < V[4] * 2 ? 6.0F : aExplosionPower < V[5] ? 7.0F : aExplosionPower < V[6] ? 8.0F : aExplosionPower < V[7] ? 9.0F : 10.0F;
+ float tStrength =
+ aExplosionPower < V[0] ? 1.0F :
+ aExplosionPower < V[1] ? 2.0F :
+ aExplosionPower < V[2] ? 3.0F :
+ aExplosionPower < V[3] ? 4.0F :
+ aExplosionPower < V[4] ? 5.0F :
+ aExplosionPower < V[4] * 2 ? 6.0F :
+ aExplosionPower < V[5] ? 7.0F :
+ aExplosionPower < V[6] ? 8.0F :
+ aExplosionPower < V[7] ? 9.0F :
+ aExplosionPower < V[8] ? 10.0F :
+ aExplosionPower < V[8] * 2 ? 11.0F :
+ aExplosionPower < V[9] ? 12.0F :
+ aExplosionPower < V[10] ? 13.0F :
+ aExplosionPower < V[11] ? 14.0F :
+ aExplosionPower < V[12] ? 15.0F :
+ aExplosionPower < V[12] * 2 ? 16.0F :
+ aExplosionPower < V[13] ? 17.0F :
+ aExplosionPower < V[14] ? 18.0F :
+ aExplosionPower < V[15] ? 19.0F : 20.0F;
int tX = getBaseMetaTileEntity().getXCoord(), tY = getBaseMetaTileEntity().getYCoord(), tZ = getBaseMetaTileEntity().getZCoord();
World tWorld = getBaseMetaTileEntity().getWorld();
tWorld.setBlock(tX, tY, tZ, Blocks.air);
diff --git a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java
index e410c3cf12..dc56054fee 100644
--- a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java
@@ -828,7 +828,26 @@ public abstract class MetaTileEntity implements IMetaTileEntity {
@Override
public void doExplosion(long aExplosionPower) {
- float tStrength = aExplosionPower < V[0] ? 1.0F : aExplosionPower < V[1] ? 2.0F : aExplosionPower < V[2] ? 3.0F : aExplosionPower < V[3] ? 4.0F : aExplosionPower < V[4] ? 5.0F : aExplosionPower < V[4] * 2 ? 6.0F : aExplosionPower < V[5] ? 7.0F : aExplosionPower < V[6] ? 8.0F : aExplosionPower < V[7] ? 9.0F : 10.0F;
+ float tStrength =
+ aExplosionPower < V[0] ? 1.0F :
+ aExplosionPower < V[1] ? 2.0F :
+ aExplosionPower < V[2] ? 3.0F :
+ aExplosionPower < V[3] ? 4.0F :
+ aExplosionPower < V[4] ? 5.0F :
+ aExplosionPower < V[4] * 2 ? 6.0F :
+ aExplosionPower < V[5] ? 7.0F :
+ aExplosionPower < V[6] ? 8.0F :
+ aExplosionPower < V[7] ? 9.0F :
+ aExplosionPower < V[8] ? 10.0F :
+ aExplosionPower < V[8] * 2 ? 11.0F :
+ aExplosionPower < V[9] ? 12.0F :
+ aExplosionPower < V[10] ? 13.0F :
+ aExplosionPower < V[11] ? 14.0F :
+ aExplosionPower < V[12] ? 15.0F :
+ aExplosionPower < V[12] * 2 ? 16.0F :
+ aExplosionPower < V[13] ? 17.0F :
+ aExplosionPower < V[14] ? 18.0F :
+ aExplosionPower < V[15] ? 19.0F : 20.0F;
int tX = getBaseMetaTileEntity().getXCoord(), tY = getBaseMetaTileEntity().getYCoord(), tZ = getBaseMetaTileEntity().getZCoord();
World tWorld = getBaseMetaTileEntity().getWorld();
GT_Utility.sendSoundToPlayers(tWorld, GregTech_API.sSoundList.get(209), 1.0F, -1, tX, tY, tZ);
diff --git a/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java b/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java
index 683fe8aab6..305dfa36c0 100644
--- a/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java
+++ b/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java
@@ -31,11 +31,11 @@ public class GT_MetaTileEntity_E_Furnace extends GT_MetaTileEntity_BasicMachine
@Override
public int checkRecipe() {
if (null != (mOutputItems[0] = GT_ModHandler.getSmeltingOutput(getInputAt(0), true, getOutputAt(0)))) {
- mEUt = 4 * (1 << (mTier - 1)) * (1 << (mTier - 1));
- mMaxProgresstime = 128 / (1 << (mTier - 1));
- return 2;
+ calculateOverclockedNess(4,128);
+ if(mMaxProgresstime==Integer.MAX_VALUE-1 && mEUt==Integer.MAX_VALUE-1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
+ return FOUND_AND_SUCCESSFULLY_USED_RECIPE;
}
- return 0;
+ return DID_NOT_FIND_RECIPE;
}
@Override
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java
index 5a2ab2a0fe..8085297060 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java
@@ -186,12 +186,12 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
@Override
public long getMinimumStoredEU() {
- return V[mTier] * 16;
+ return V[mTier] * 16L;
}
@Override
public long maxEUStore() {
- return V[mTier] * 64;
+ return V[mTier] * 64L;
}
@Override
@@ -206,7 +206,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
@Override
public long maxAmperesIn() {
- return (mEUt * 2) / V[mTier] + 1;
+ return ((long)mEUt * 2L) / V[mTier] + 1L;
}
@Override
@@ -452,7 +452,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
if (allowToCheckRecipe()) {
if (mMaxProgresstime <= 0 && aBaseMetaTileEntity.isAllowedToWork() && (tRemovedOutputFluid || tSucceeded || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) && hasEnoughEnergyToCheckRecipe()) {
- if (checkRecipe() == 2) {
+ if (checkRecipe() == FOUND_AND_SUCCESSFULLY_USED_RECIPE) {
if (mInventory[3] != null && mInventory[3].stackSize <= 0) mInventory[3] = null;
for (int i = getInputSlot(), j = i + mInputSlotCount; i < j; i++)
if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null;
@@ -516,15 +516,38 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
}
protected void calculateOverclockedNess(int aEUt, int aDuration) {
- if (aEUt <= 16) {
- mEUt = aEUt * (1 << (mTier - 1)) * (1 << (mTier - 1));
- mMaxProgresstime = aDuration / (1 << (mTier - 1));
- } else {
- mEUt = aEUt;
+ if(mTier==0){
+ //Long time calculation
+ long xMaxProgresstime = (long)aDuration*2L;
+ if(xMaxProgresstime>Integer.MAX_VALUE-1){
+ //make impossible if too long
+ mEUt=Integer.MAX_VALUE-1;
+ mMaxProgresstime=Integer.MAX_VALUE-1;
+ }else{
+ mEUt=aEUt/2;
+ mMaxProgresstime=(int)xMaxProgresstime;
+ }
+ }else{
+ //Long EUt calculation
+ long xEUt=(long)aEUt;
+ //Isnt too low EUt check?
+ long tempEUt = xEUt<V[1] ? V[1] : xEUt;
+
mMaxProgresstime = aDuration;
- while (mEUt <= V[mTier - 1] * mAmperage) {
- mEUt *= 4;
- mMaxProgresstime /= 2;
+
+ while (tempEUt <= V[mTier -1] * (long)mAmperage) {
+ tempEUt *= 4;//this actually controls overclocking
+ xEUt *= 4;//this is effect of everclocking
+ mMaxProgresstime /= 2;//this is effect of overclocking
+ xEUt= mMaxProgresstime==0 ? xEUt/2 : xEUt;//U know if the time is 1 tick make the machine use 2x less power
+ }
+ if(xEUt>Integer.MAX_VALUE-1){
+ mEUt=Integer.MAX_VALUE-1;
+ mMaxProgresstime=Integer.MAX_VALUE-1;
+ }else{
+ mEUt=(int)xEUt;
+ mEUt=mEUt==0 ? 1 : mEUt;
+ //mMaxProgresstime is set already
}
}
}
@@ -739,6 +762,8 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
mOutputItems[i] = tRecipe.getOutput(i);
mOutputFluid = tRecipe.getFluidOutput(0);
calculateOverclockedNess(tRecipe);
+ //In case recipe is too OP for that machine
+ if(mMaxProgresstime==Integer.MAX_VALUE-1 && mEUt==Integer.MAX_VALUE-1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
return FOUND_AND_SUCCESSFULLY_USED_RECIPE;
}