diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-03-14 21:11:08 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-03-14 21:11:08 +0000 |
commit | ec3ad861c70a4dc76ee6a391026b40904469b29f (patch) | |
tree | 9035ac1076a74cbdaeb2726ccac9db00b0724d0b | |
parent | 4b3da0d3c95218a8ee40f1db0e74e573f1290bf2 (diff) | |
download | GT5-Unofficial-ec3ad861c70a4dc76ee6a391026b40904469b29f.tar.gz GT5-Unofficial-ec3ad861c70a4dc76ee6a391026b40904469b29f.tar.bz2 GT5-Unofficial-ec3ad861c70a4dc76ee6a391026b40904469b29f.zip |
$ Hopefully Fixed #425 properly.
3 files changed, 67 insertions, 26 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java index 9c9fa7fa58..5e852b5f76 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java @@ -113,6 +113,24 @@ extends GregtechMeta_MultiBlockBase { final int tX = this.getBaseMetaTileEntity().getXCoord(); final int tY = this.getBaseMetaTileEntity().getYCoord(); final int tZ = this.getBaseMetaTileEntity().getZCoord(); + + + //Check Rear Middle + { + Block aBlock = this.getBaseMetaTileEntity() + .getBlockAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); + int aMeta = this.getBaseMetaTileEntity() + .getMetaIDAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); + IGregTechTileEntity aTile = this.getBaseMetaTileEntity() + .getIGregTechTileEntityAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); + if (!isValidBlockForStructure(aTile, getCasingTextureIndex(), true, aBlock, aMeta, getCasingBlock(), + getCasingMeta())) { + log("Bad Casing on Cutting Machine."); + return false; + } + } + + for (byte i = -1; i < 2; i = (byte) (i + 1)) { for (byte j = -1; j < 2; j = (byte) (j + 1)) { if ((i != 0) || (j != 0)) { @@ -121,7 +139,7 @@ extends GregtechMeta_MultiBlockBase { int aMeta = this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)); IGregTechTileEntity aTile = this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)); if (!isValidBlockForStructure(aTile, getCasingTextureIndex(), true, aBlock, aMeta, getCasingBlock(), getCasingMeta())) { - Logger.INFO("Bad Casing on Cutting Machine."); + log("Bad Casing on Cutting Machine."); return false; } } @@ -129,18 +147,18 @@ extends GregtechMeta_MultiBlockBase { } } if ((this.mInputBusses.size() == 0) || (this.mOutputBusses.size() == 0)) { - Logger.INFO("Incorrect amount of Input & Output busses."); + log("Incorrect amount of Input & Output busses."); return false; } if ((this.mMaintenanceHatches.size() != 1)) { - Logger.INFO("Incorrect amount of Maintenance or Energy hatches."); + log("Incorrect amount of Maintenance or Energy hatches."); return false; } } else { - Logger.INFO("False 5"); + log("False 5"); return false; } - Logger.INFO("True"); + log("True"); return true; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java index e407e28b0e..f4f8a5fe78 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java @@ -113,9 +113,9 @@ extends GregtechMeta_MultiBlockBase { } if (inputs.length > 0) { int para = (4* GT_Utility.getTier(this.getMaxInputVoltage())); - Logger.WARNING("Recipe. ["+inputs.length+"]["+para+"]"); + log("Recipe. ["+inputs.length+"]["+para+"]"); if (checkRecipeGeneric(inputs, new FluidStack[]{}, para, 100, 250, 10000)) { - Logger.WARNING("Recipe 2."); + log("Recipe 2."); return true; } } @@ -152,6 +152,22 @@ extends GregtechMeta_MultiBlockBase { return false; } } + + //Check Rear Middle + { + Block aBlock = this.getBaseMetaTileEntity() + .getBlockAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); + int aMeta = this.getBaseMetaTileEntity() + .getMetaIDAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); + IGregTechTileEntity aTile = this.getBaseMetaTileEntity() + .getIGregTechTileEntityAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); + if (!isValidBlockForStructure(aTile, getCasingTextureIndex(), true, aBlock, aMeta, getCasingBlock(), + getCasingMeta())) { + log("Bad Casing on Extruder."); + return false; + } + } + final int tX = this.getBaseMetaTileEntity().getXCoord(); final int tY = this.getBaseMetaTileEntity().getYCoord(); final int tZ = this.getBaseMetaTileEntity().getZCoord(); @@ -164,7 +180,7 @@ extends GregtechMeta_MultiBlockBase { int aMeta = this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)); IGregTechTileEntity aTile = this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)); if (!isValidBlockForStructure(aTile, getCasingTextureIndex(), true, aBlock, aMeta, getCasingBlock(), getCasingMeta())) { - Logger.INFO("Bad Casing on Extruder."); + log("Bad Casing on Extruder."); return false; } @@ -173,18 +189,18 @@ extends GregtechMeta_MultiBlockBase { } } if ((this.mInputBusses.size() == 0) || (this.mOutputBusses.size() == 0)) { - Logger.WARNING("Incorrect amount of Input || Output busses."); + log("Incorrect amount of Input || Output busses."); return false; } if ((this.mMaintenanceHatches.size() != 1)) { - Logger.WARNING("Incorrect amount of Maintenance hatches."); + log("Incorrect amount of Maintenance hatches."); return false; } } else { - Logger.WARNING("False 5"); + log("False 5"); return false; } - Logger.WARNING("True"); + log("True"); return true; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java index 502b5e47b2..d798691d04 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java @@ -118,6 +118,21 @@ extends GregtechMeta_MultiBlockBase { return false; } } + + //Check Rear Middle + { + Block aBlock = this.getBaseMetaTileEntity() + .getBlockAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); + int aMeta = this.getBaseMetaTileEntity() + .getMetaIDAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); + IGregTechTileEntity aTile = this.getBaseMetaTileEntity() + .getIGregTechTileEntityAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); + if (!isValidBlockForStructure(aTile, getCasingTextureIndex(), true, aBlock, aMeta, getCasingBlock(), + getCasingMeta())) { + log("Bad Casing on Wiremill."); + return false; + } + } final int tX = this.getBaseMetaTileEntity().getXCoord(); final int tY = this.getBaseMetaTileEntity().getYCoord(); final int tZ = this.getBaseMetaTileEntity().getZCoord(); @@ -129,7 +144,7 @@ extends GregtechMeta_MultiBlockBase { int aMeta = this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)); IGregTechTileEntity aTile = this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)); if (!isValidBlockForStructure(aTile, getCasingTextureIndex(), true, aBlock, aMeta, getCasingBlock(), getCasingMeta())) { - Logger.INFO("Bad Casing on Wiremill."); + log("Bad Casing on Wiremill."); return false; } } @@ -137,22 +152,22 @@ extends GregtechMeta_MultiBlockBase { } } if ((this.mOutputHatches.size() != 0) || (this.mInputHatches.size() != 0)) { - Logger.INFO("Use Busses, Not Hatches for Input/Output."); + log("Use Busses, Not Hatches for Input/Output."); return false; } if ((this.mInputBusses.size() == 0) || (this.mOutputBusses.size() == 0)) { - Logger.INFO("Incorrect amount of Input & Output busses."); + log("Incorrect amount of Input & Output busses."); return false; } if ((this.mMaintenanceHatches.size() != 1)) { - Logger.INFO("Incorrect amount of Maintenance or Energy hatches."); + log("Incorrect amount of Maintenance or Energy hatches."); return false; } } else { - Logger.INFO("False 5"); + log("False 5"); return false; } - Logger.INFO("True"); + log("True"); return true; } @@ -189,12 +204,4 @@ extends GregtechMeta_MultiBlockBase { public byte getCasingTextureIndex() { return (byte) TAE.GTPP_INDEX(6); } - - private boolean addToMachineList(final IGregTechTileEntity tTileEntity) { - return ((this.addMaintenanceToMachineList(tTileEntity, this.getCasingTextureIndex())) || (this.addInputToMachineList(tTileEntity, this.getCasingTextureIndex())) || (this.addOutputToMachineList(tTileEntity, this.getCasingTextureIndex())) || (this.addMufflerToMachineList(tTileEntity, this.getCasingTextureIndex()))); - } - - private boolean addEnergyInputToMachineList(final IGregTechTileEntity tTileEntity) { - return ((this.addEnergyInputToMachineList(tTileEntity, this.getCasingTextureIndex()))); - } }
\ No newline at end of file |