Null checks before instanceof
This commit is contained in:
parent
50f141edbd
commit
b609b08f98
|
@ -93,7 +93,7 @@ public class PacketNEIRecipe extends AppEngPacket
|
|||
EntityPlayerMP pmp = ( EntityPlayerMP ) player;
|
||||
Container con = pmp.openContainer;
|
||||
|
||||
if ( con != null && con instanceof IContainerCraftingPacket )
|
||||
if ( con instanceof IContainerCraftingPacket )
|
||||
{
|
||||
IContainerCraftingPacket cct = ( IContainerCraftingPacket ) con;
|
||||
IGridNode node = cct.getNetworkNode();
|
||||
|
|
|
@ -657,7 +657,7 @@ public class MeteoritePlacer
|
|||
{
|
||||
this.put( w, x, y, z, this.skychest );
|
||||
TileEntity te = w.getTileEntity( x, y, z );
|
||||
if ( te != null && te instanceof IInventory )
|
||||
if ( te instanceof IInventory )
|
||||
{
|
||||
InventoryAdaptor ap = InventoryAdaptor.getAdaptor( te, ForgeDirection.UP );
|
||||
|
||||
|
|
Loading…
Reference in a new issue