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