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.
This commit is contained in:
FyberOptic 2013-07-26 13:02:12 -04:00
parent 0909ed9875
commit bffa773344
4 changed files with 12 additions and 2 deletions

View file

@ -5,7 +5,7 @@ public interface ILaserTarget {
void receiveLaserEnergy(float energy); void receiveLaserEnergy(float energy);
boolean isInvalid(); boolean isInvalidTarget();
int getXCoord(); int getXCoord();

View file

@ -525,4 +525,9 @@ public class TileAdvancedCraftingTable extends TileEntity implements IInventory,
lastMode = ActionMachineControl.Mode.Off; lastMode = ActionMachineControl.Mode.Off;
} }
} }
@Override
public boolean isInvalidTarget() {
return isInvalid();
}
} }

View file

@ -485,4 +485,9 @@ public class TileAssemblyTable extends TileEntity implements IMachine, IInventor
// TODO Auto-generated method stub // TODO Auto-generated method stub
return true; return true;
} }
@Override
public boolean isInvalidTarget() {
return isInvalid();
}
} }

View file

@ -114,7 +114,7 @@ public class TileLaser extends TileBuildCraft implements IPowerReceptor, IAction
protected boolean isValidTable() { protected boolean isValidTable() {
if (laserTarget == null || laserTarget.isInvalid() || !laserTarget.hasCurrentWork()) if (laserTarget == null || laserTarget.isInvalidTarget() || !laserTarget.hasCurrentWork())
return false; return false;
return true; return true;