Changed to Null ItemStack instead of null.

This commit is contained in:
yueh
2016-12-21 20:27:23 +01:00
parent ed9e6dd21c
commit 1cde7bc933
36 changed files with 95 additions and 78 deletions
+5 -5
View File
@@ -1626,7 +1626,7 @@ public class Platform
{
if( providedTemplate == null )
{
return null;
return ItemStack.EMPTY;
}
final AEItemStack ae_req = AEItemStack.create( providedTemplate );
@@ -1679,7 +1679,7 @@ public class Platform
}
}
}
return null;
return ItemStack.EMPTY;
}
public static ItemStack cloneItemStack( final ItemStack a )
@@ -1691,7 +1691,7 @@ public class Platform
{
if( stackInSlot == null )
{
return null;
return ItemStack.EMPTY;
}
final Item i = stackInSlot.getItem();
@@ -1702,13 +1702,13 @@ public class Platform
stackInSlot.setCount( stackInSlot.getCount() - 1 );
return stackInSlot;
}
return null;
return ItemStack.EMPTY;
}
ItemStack ci = i.getContainerItem( stackInSlot.copy() );
if( ci != null && ci.isItemStackDamageable() && ci.getItemDamage() == ci.getMaxDamage() )
{
ci = null;
ci = ItemStack.EMPTY;
}
return ci;
@@ -264,7 +264,7 @@ public class AdaptorIInventory extends InventoryAdaptor
{
if( itemsToAdd == null || itemsToAdd.getCount() == 0 )
{
return null;
return ItemStack.EMPTY;
}
final ItemStack left = itemsToAdd.copy();
@@ -292,7 +292,7 @@ public class AdaptorIInventory extends InventoryAdaptor
if( left.getCount() <= 0 )
{
return null;
return ItemStack.EMPTY;
}
}
else if( Platform.itemComparisons().isSameItem( is, left ) && is.getCount() < perOperationLimit )
@@ -310,7 +310,7 @@ public class AdaptorIInventory extends InventoryAdaptor
left.grow( -used );
if( left.getCount() <= 0 )
{
return null;
return ItemStack.EMPTY;
}
}
}