From 5d8bcb0af35e57da789fc6b2126cb6931c092c4a Mon Sep 17 00:00:00 2001 From: Johannes Gäßler Date: Sun, 2 Jul 2017 01:02:55 +0200 Subject: Added a method for calculating total version ID --- src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/java/gregtech/api') 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 { -- cgit