Simplified return condition

This commit is contained in:
thatsIch 2014-11-04 02:30:59 +01:00
parent a80728de01
commit bfc8fac0dd

View file

@ -58,11 +58,8 @@ public class BlockCrank extends AEBaseBlock
private boolean isCrankable(World w, int x, int y, int z, ForgeDirection offset)
{
TileEntity te = w.getTileEntity( x + offset.offsetX, y + offset.offsetY, z + offset.offsetZ );
if ( te instanceof ICrankable )
{
return ((ICrankable) te).canCrankAttach( offset.getOpposite() );
}
return false;
return te instanceof ICrankable && ( ( ICrankable ) te ).canCrankAttach( offset.getOpposite() );
}
private ForgeDirection findCrankable(World w, int x, int y, int z)