Port to 1.11
This commit is contained in:
@@ -162,7 +162,7 @@ public abstract class MBCalculator
|
||||
*/
|
||||
public abstract IAECluster createCluster( World w, WorldCoord min, WorldCoord max );
|
||||
|
||||
public abstract boolean verifyInternalStructure( World worldObj, WorldCoord min, WorldCoord max );
|
||||
public abstract boolean verifyInternalStructure( World world, WorldCoord min, WorldCoord max );
|
||||
|
||||
/**
|
||||
* disassembles the multi-block.
|
||||
|
||||
@@ -506,7 +506,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
|
||||
final IAEItemStack ais = this.inventory.extractItems( fuzz, Actionable.SIMULATE, this.machineSrc );
|
||||
final ItemStack is = ais == null ? null : ais.getItemStack();
|
||||
|
||||
if( is != null && is.stackSize == g.getStackSize() )
|
||||
if( is != null && is.getCount() == g.getStackSize() )
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
@@ -514,7 +514,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
|
||||
else if( is != null )
|
||||
{
|
||||
g = g.copy();
|
||||
g.decStackSize( is.stackSize );
|
||||
g.decStackSize( is.getCount() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -528,7 +528,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
|
||||
final IAEItemStack ais = this.inventory.extractItems( g.copy(), Actionable.SIMULATE, this.machineSrc );
|
||||
final ItemStack is = ais == null ? null : ais.getItemStack();
|
||||
|
||||
if( is == null || is.stackSize < g.getStackSize() )
|
||||
if( is == null || is.getCount() < g.getStackSize() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -714,7 +714,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
|
||||
{
|
||||
this.postChange( input[x], this.machineSrc );
|
||||
ic.setInventorySlotContents( x, is );
|
||||
if( is.stackSize == input[x].getStackSize() )
|
||||
if( is.getCount() == input[x].getStackSize() )
|
||||
{
|
||||
found = true;
|
||||
continue;
|
||||
|
||||
@@ -270,14 +270,14 @@ public class CellInventory implements ICellInventory
|
||||
if( input.getStackSize() > remainingItemCount )
|
||||
{
|
||||
final ItemStack toReturn = Platform.cloneItemStack( sharedItemStack );
|
||||
toReturn.stackSize = sharedItemStack.stackSize - remainingItemCount;
|
||||
toReturn.setCount( sharedItemStack.getCount() - remainingItemCount );
|
||||
if( mode == Actionable.MODULATE )
|
||||
{
|
||||
final ItemStack toWrite = Platform.cloneItemStack( sharedItemStack );
|
||||
toWrite.stackSize = remainingItemCount;
|
||||
toWrite.setCount( remainingItemCount );
|
||||
|
||||
this.cellItems.add( AEItemStack.create( toWrite ) );
|
||||
this.updateItemCount( toWrite.stackSize );
|
||||
this.updateItemCount( toWrite.getCount() );
|
||||
|
||||
this.saveChanges();
|
||||
}
|
||||
@@ -461,7 +461,7 @@ public class CellInventory implements ICellInventory
|
||||
final ItemStack t;
|
||||
try
|
||||
{
|
||||
t = ItemStack.loadItemStackFromNBT( compoundTag );
|
||||
t = new ItemStack( compoundTag );
|
||||
if( t == null )
|
||||
{
|
||||
AELog.warn( "Removing item " + compoundTag + " from storage cell because the associated item type couldn't be found." );
|
||||
@@ -478,9 +478,9 @@ public class CellInventory implements ICellInventory
|
||||
throw ex;
|
||||
}
|
||||
|
||||
t.stackSize = stackSize;
|
||||
t.setCount( stackSize );
|
||||
|
||||
if( t.stackSize > 0 )
|
||||
if( t.getCount() > 0 )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -555,7 +555,8 @@ public class CellInventory implements ICellInventory
|
||||
public boolean canHoldNewItem()
|
||||
{
|
||||
final long bytesFree = this.getFreeBytes();
|
||||
return ( bytesFree > this.getBytesPerType() || ( bytesFree == this.getBytesPerType() && this.getUnusedItemCount() > 0 ) ) && this.getRemainingItemTypes() > 0;
|
||||
return ( bytesFree > this.getBytesPerType() || ( bytesFree == this.getBytesPerType() && this.getUnusedItemCount() > 0 ) ) && this
|
||||
.getRemainingItemTypes() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -98,7 +98,7 @@ public class MEMonitorIInventory implements IMEMonitor<IAEItemStack>, ITickingMo
|
||||
|
||||
// better then doing construction from scratch :3
|
||||
final IAEItemStack o = input.copy();
|
||||
o.setStackSize( out.stackSize );
|
||||
o.setStackSize( out.getCount() );
|
||||
return o;
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ public class MEMonitorIInventory implements IMEMonitor<IAEItemStack>, ITickingMo
|
||||
|
||||
// better then doing construction from scratch :3
|
||||
final IAEItemStack o = request.copy();
|
||||
o.setStackSize( out.stackSize );
|
||||
o.setStackSize( out.getCount() );
|
||||
|
||||
if( type == Actionable.MODULATE )
|
||||
{
|
||||
@@ -177,8 +177,8 @@ public class MEMonitorIInventory implements IMEMonitor<IAEItemStack>, ITickingMo
|
||||
}
|
||||
else
|
||||
{
|
||||
final int newSize = ( newIS == null ? 0 : newIS.stackSize );
|
||||
final int diff = newSize - ( oldIS == null ? 0 : oldIS.stackSize );
|
||||
final int newSize = ( newIS == null ? 0 : newIS.getCount() );
|
||||
final int diff = newSize - ( oldIS == null ? 0 : oldIS.getCount() );
|
||||
|
||||
final IAEItemStack stack = ( old == null || old.aeStack == null ? AEApi.instance().storage().createItemStack( newIS ) : old.aeStack.copy() );
|
||||
if( stack != null )
|
||||
|
||||
Reference in New Issue
Block a user