Deleted redundant null checks
This commit is contained in:
@@ -404,7 +404,7 @@ public abstract class AEBaseContainer extends Container
|
||||
return null;
|
||||
else if ( dest == null )
|
||||
{
|
||||
cs.putStack( tis != null ? tis.copy() : null );
|
||||
cs.putStack( tis.copy() );
|
||||
cs.onSlotChanged();
|
||||
updateSlot( cs );
|
||||
return null;
|
||||
@@ -422,13 +422,13 @@ public abstract class AEBaseContainer extends Container
|
||||
if ( d instanceof SlotDisabled || d instanceof SlotME )
|
||||
continue;
|
||||
|
||||
if ( d.isItemValid( tis ) && tis != null )
|
||||
if ( d.isItemValid( tis ) )
|
||||
{
|
||||
if ( d.getHasStack() )
|
||||
{
|
||||
ItemStack t = d.getStack();
|
||||
|
||||
if ( tis != null && Platform.isSameItemPrecise( tis, t ) ) // t.isItemEqual(tis))
|
||||
if ( Platform.isSameItemPrecise( tis, t ) ) // t.isItemEqual(tis))
|
||||
{
|
||||
int maxSize = t.getMaxStackSize();
|
||||
if ( maxSize > d.getSlotStackLimit() )
|
||||
@@ -468,13 +468,13 @@ public abstract class AEBaseContainer extends Container
|
||||
if ( d instanceof SlotDisabled || d instanceof SlotME )
|
||||
continue;
|
||||
|
||||
if ( d.isItemValid( tis ) && tis != null )
|
||||
if ( d.isItemValid( tis ) )
|
||||
{
|
||||
if ( d.getHasStack() )
|
||||
{
|
||||
ItemStack t = d.getStack();
|
||||
|
||||
if ( tis != null && Platform.isSameItemPrecise( t, tis ) )
|
||||
if ( Platform.isSameItemPrecise( t, tis ) )
|
||||
{
|
||||
int maxSize = t.getMaxStackSize();
|
||||
if ( d.getSlotStackLimit() < maxSize )
|
||||
|
||||
@@ -346,16 +346,13 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
|
||||
ItemStack is = r.getCraftingResult( ic );
|
||||
|
||||
if ( r != null && inv != null )
|
||||
for (int x = 0; x < ic.getSizeInventory(); x++)
|
||||
{
|
||||
for (int x = 0; x < ic.getSizeInventory(); x++)
|
||||
if ( ic.getStackInSlot( x ) != null )
|
||||
{
|
||||
if ( ic.getStackInSlot( x ) != null )
|
||||
{
|
||||
ItemStack pulled = Platform.extractItemsByRecipe( powerSrc, mySrc, storage, p.worldObj, r, is, ic, ic.getStackInSlot( x ), x, all,
|
||||
Actionable.MODULATE, ItemViewCell.createFilter( getViewCells() ) );
|
||||
real.setInventorySlotContents( x, pulled );
|
||||
}
|
||||
ItemStack pulled = Platform.extractItemsByRecipe( powerSrc, mySrc, storage, p.worldObj, r, is, ic, ic.getStackInSlot( x ), x, all,
|
||||
Actionable.MODULATE, ItemViewCell.createFilter( getViewCells() ) );
|
||||
real.setInventorySlotContents( x, pulled );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
|
||||
|
||||
is = r.getCraftingResult( ic );
|
||||
|
||||
if ( r != null && inv != null )
|
||||
if ( inv != null )
|
||||
{
|
||||
for (int x = 0; x < pattern.getSizeInventory(); x++)
|
||||
{
|
||||
|
||||
@@ -196,7 +196,7 @@ public class SlotRestrictedInput extends AppEngSlot
|
||||
case STORAGE_CELLS:
|
||||
return AEApi.instance().registries().cell().isCellHandled( i );
|
||||
case WORKBENCH_CELL:
|
||||
return i != null && i.getItem() instanceof ICellWorkbenchItem && ((ICellWorkbenchItem) i.getItem()).isEditable( i );
|
||||
return i.getItem() instanceof ICellWorkbenchItem && ((ICellWorkbenchItem) i.getItem()).isEditable( i );
|
||||
case STORAGE_COMPONENT:
|
||||
boolean isComp = i.getItem() instanceof IStorageComponent && ((IStorageComponent) i.getItem()).isStorageComponent( i );
|
||||
return isComp;
|
||||
|
||||
Reference in New Issue
Block a user