From bffa773344b650dee34c2de8fb25665649624fe8 Mon Sep 17 00:00:00 2001 From: FyberOptic Date: Fri, 26 Jul 2013 13:02:12 -0400 Subject: [PATCH] Assembly Table isInvalid() Crash Fix Solution for #1054. Avoids crash from name conflict with .isInvalid() between ILaserTarget interface and TileEntity class, in relation to TileAssemblyTable and TileAdvancedCraftingTable. --- common/buildcraft/silicon/ILaserTarget.java | 2 +- common/buildcraft/silicon/TileAdvancedCraftingTable.java | 5 +++++ common/buildcraft/silicon/TileAssemblyTable.java | 5 +++++ common/buildcraft/silicon/TileLaser.java | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/common/buildcraft/silicon/ILaserTarget.java b/common/buildcraft/silicon/ILaserTarget.java index f5ba9973..46a39b60 100644 --- a/common/buildcraft/silicon/ILaserTarget.java +++ b/common/buildcraft/silicon/ILaserTarget.java @@ -5,7 +5,7 @@ public interface ILaserTarget { void receiveLaserEnergy(float energy); - boolean isInvalid(); + boolean isInvalidTarget(); int getXCoord(); diff --git a/common/buildcraft/silicon/TileAdvancedCraftingTable.java b/common/buildcraft/silicon/TileAdvancedCraftingTable.java index 18012094..c29e4808 100644 --- a/common/buildcraft/silicon/TileAdvancedCraftingTable.java +++ b/common/buildcraft/silicon/TileAdvancedCraftingTable.java @@ -525,4 +525,9 @@ public class TileAdvancedCraftingTable extends TileEntity implements IInventory, lastMode = ActionMachineControl.Mode.Off; } } + + @Override + public boolean isInvalidTarget() { + return isInvalid(); + } } diff --git a/common/buildcraft/silicon/TileAssemblyTable.java b/common/buildcraft/silicon/TileAssemblyTable.java index d7212097..dd017f39 100644 --- a/common/buildcraft/silicon/TileAssemblyTable.java +++ b/common/buildcraft/silicon/TileAssemblyTable.java @@ -485,4 +485,9 @@ public class TileAssemblyTable extends TileEntity implements IMachine, IInventor // TODO Auto-generated method stub return true; } + + @Override + public boolean isInvalidTarget() { + return isInvalid(); + } } diff --git a/common/buildcraft/silicon/TileLaser.java b/common/buildcraft/silicon/TileLaser.java index 57fc0e7d..1ed51bf7 100644 --- a/common/buildcraft/silicon/TileLaser.java +++ b/common/buildcraft/silicon/TileLaser.java @@ -114,7 +114,7 @@ public class TileLaser extends TileBuildCraft implements IPowerReceptor, IAction protected boolean isValidTable() { - if (laserTarget == null || laserTarget.isInvalid() || !laserTarget.hasCurrentWork()) + if (laserTarget == null || laserTarget.isInvalidTarget() || !laserTarget.hasCurrentWork()) return false; return true;