diff options
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index bb822ec816..3e5c783a5c 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -1508,28 +1508,37 @@ GT_MetaTileEntity_MultiBlockBase { public abstract boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack); - public boolean isValidBlockForStructure(IGregTechTileEntity aBaseMetaTileEntity, int aCasingID, boolean canBeHatch, Block aFoundBlock, int aFoundMeta, Block aExpectedBlock, int aExpectedMeta) { - boolean isHatch = false; + public boolean isValidBlockForStructure(IGregTechTileEntity aBaseMetaTileEntity, int aCasingID, boolean canBeHatch, + Block aFoundBlock, int aFoundMeta, Block aExpectedBlock, int aExpectedMeta) { + boolean isHatch = false; if (aBaseMetaTileEntity != null) { isHatch = this.addToMachineList(aBaseMetaTileEntity, aCasingID); if (isHatch) { return true; } + else { + //Found a controller + if (aFoundMeta > 0 && aFoundMeta < 1000 && aFoundBlock == GregTech_API.sBlockMachines) { + return true; + } + } } if (!isHatch) { - if (aFoundBlock != aExpectedBlock || aFoundMeta != aExpectedMeta) { + if (aFoundBlock == aExpectedBlock && aFoundMeta == aExpectedMeta) { + return true; + } + else if (aFoundBlock != aExpectedBlock) { + Logger.INFO("A1 - Found: "+aFoundBlock.getLocalizedName()+", Expected: "+aExpectedBlock.getLocalizedName()); return false; } - else { - return true; + else if (aFoundMeta != aExpectedMeta) { + Logger.INFO("A2"); + return false; } + } - else { - return true; - } - - - + Logger.INFO("A3"); + return false; } |