Null checks before instanceof

This commit is contained in:
thatsIch 2015-03-26 12:12:40 +01:00
parent 50f141edbd
commit b609b08f98
2 changed files with 2 additions and 2 deletions

View file

@ -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();

View file

@ -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 );