diff options
author | Johannes Gäßler <updrn@student.kit.edu> | 2017-07-02 01:02:55 +0200 |
---|---|---|
committer | Johannes Gäßler <updrn@student.kit.edu> | 2017-07-02 01:02:55 +0200 |
commit | 5d8bcb0af35e57da789fc6b2126cb6931c092c4a (patch) | |
tree | 284d0e867d18dece213acd75d037f8f034a110e9 /src/main/java/gregtech/api | |
parent | a6046ddfad81dca9b1c63d5f171b9ccd137f7288 (diff) | |
download | GT5-Unofficial-5d8bcb0af35e57da789fc6b2126cb6931c092c4a.tar.gz GT5-Unofficial-5d8bcb0af35e57da789fc6b2126cb6931c092c4a.tar.bz2 GT5-Unofficial-5d8bcb0af35e57da789fc6b2126cb6931c092c4a.zip |
Added a method for calculating total version ID
Diffstat (limited to 'src/main/java/gregtech/api')
-rw-r--r-- | src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index 09cf8e2f2b..6792e50127 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -1917,8 +1917,9 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE */ private int shiftInventoryIndex(int slotIndex, int nbtVersion){ int oldInputSize, newInputSize, oldOutputSize, newOutputSize; + int chemistryUpdateVersion = GT_Mod.calculateTotalGTVersion(509, 31); if (mID >= 211 && mID <= 218) {//Assembler - if (nbtVersion < 509031) { + if (nbtVersion < chemistryUpdateVersion) { oldInputSize = 2; oldOutputSize = 1; } else { @@ -1927,7 +1928,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE newInputSize = 6; newOutputSize = 1; } else if (mID >= 421 && mID <= 428){//Chemical Reactor - if (nbtVersion < 509031) { + if (nbtVersion < chemistryUpdateVersion) { oldInputSize = 2; oldOutputSize = 1; } else { @@ -1936,7 +1937,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE newInputSize = 2; newOutputSize = 2; } else if (mID >= 531 && mID <= 538) {//Distillery - if (nbtVersion < 509031) { + if (nbtVersion < chemistryUpdateVersion) { oldInputSize = 1; oldOutputSize = 0; } else { |