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:
parent
0909ed9875
commit
bffa773344
4 changed files with 12 additions and 2 deletions
|
@ -5,7 +5,7 @@ public interface ILaserTarget {
|
|||
|
||||
void receiveLaserEnergy(float energy);
|
||||
|
||||
boolean isInvalid();
|
||||
boolean isInvalidTarget();
|
||||
|
||||
int getXCoord();
|
||||
|
||||
|
|
|
@ -525,4 +525,9 @@ public class TileAdvancedCraftingTable extends TileEntity implements IInventory,
|
|||
lastMode = ActionMachineControl.Mode.Off;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInvalidTarget() {
|
||||
return isInvalid();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue