diff options
author | botn365 <Krampus.sack.never@gmail.com> | 2020-03-25 11:17:26 +0100 |
---|---|---|
committer | botn365 <Krampus.sack.never@gmail.com> | 2020-03-25 11:17:26 +0100 |
commit | e58c293570572fd1ce2837b64586d2b81e24885b (patch) | |
tree | 422ce2c9c34fcc1a71c7f38a7844d8efc9b9827a /src | |
parent | e936a0be7639aca3a213b9c50eeb36f9fd736bea (diff) | |
download | GT5-Unofficial-e58c293570572fd1ce2837b64586d2b81e24885b.tar.gz GT5-Unofficial-e58c293570572fd1ce2837b64586d2b81e24885b.tar.bz2 GT5-Unofficial-e58c293570572fd1ce2837b64586d2b81e24885b.zip |
fixes algea pond formin isue on servers
Diffstat (limited to 'src')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java index a7afaa6b56..9f388566ac 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java @@ -150,16 +150,17 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase { * mCurrentDirectionZ; // Get Expected Tier - Block aCasingBlock = aBaseMetaTileEntity.getBlockAtSide((byte) 0); - int aCasingMeta = aBaseMetaTileEntity.getMetaIDAtSide((byte) 0); - - // Bad Casings - if ((aCasingBlock != GregTech_API.sBlockCasings1) || aCasingMeta > 9) { - return false; - } - else { - mLevel = this.getCasingTierOnClientSide(); - } +// Block aCasingBlock = aBaseMetaTileEntity.getBlockAtSide((byte) 3); +// int aCasingMeta = aBaseMetaTileEntity.getMetaIDAtSide((byte) 3); +// +// // Bad Casings +// if ((aCasingBlock != GregTech_API.sBlockCasings1) || aCasingMeta > 9) { +// Logger.INFO("is false"); +// return false; +// } +// else { + mLevel = this.getCasingTierOnClientSide(); + //} int aID = TAE.getIndexFromPage(1, 15); int tAmount = 0; check : for (int i = mOffsetX_Lower; i <= mOffsetX_Upper; ++i) { @@ -180,13 +181,13 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase { Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); - if ((tBlock == ModBlocks.blockCasings2Misc) && (tMeta == 15) && (h >= 0)) { + if ((h >= 0) && (tBlock == ModBlocks.blockCasings2Misc) && (tMeta == 15) ) { ++tAmount; } - else if ((tBlock == GregTech_API.sBlockCasings1) && (tMeta == mLevel) && (h == -1)) { + else if ((h == -1) && (tBlock == GregTech_API.sBlockCasings1) && (tMeta == mLevel) ) { ++tAmount; } - else if ((tBlock == GregTech_API.sBlockCasings1) && (tMeta != mLevel) && (h == -1)) { + else if ((h == -1) && (tBlock == GregTech_API.sBlockCasings1) && (tMeta != mLevel) ) { Logger.INFO("Found wrong tiered casing."); return false; } @@ -482,7 +483,7 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase { return false; } - @SideOnly(Side.CLIENT) + private final int getCasingTierOnClientSide() { if (this == null || this.getBaseMetaTileEntity().getWorld() == null) { return 0; @@ -491,8 +492,10 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase { Block aInitStructureCheck; int aInitStructureCheckMeta; IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity(); - aInitStructureCheck = aBaseMetaTileEntity.getBlockOffset(0, -1, 0); - aInitStructureCheckMeta = aBaseMetaTileEntity.getMetaIDOffset(0, -1, 0); + int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; + int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; + aInitStructureCheck = aBaseMetaTileEntity.getBlockOffset(xDir, -1, zDir); + aInitStructureCheckMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir, -1, zDir); if (aInitStructureCheck == GregTech_API.sBlockCasings1) { return aInitStructureCheckMeta; } |