Port to 1.11

This commit is contained in:
yueh
2016-12-08 12:42:00 +01:00
parent 589730bfad
commit ed9e6dd21c
262 changed files with 4027 additions and 3954 deletions
@@ -125,35 +125,28 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
{
if( !this.isCraftingMode() )
{
this.craftSlot.xDisplayPosition = -9000;
this.craftSlot.xPos = -9000;
for( int y = 0; y < 3; y++ )
{
this.outputSlots[y].xDisplayPosition = this.outputSlots[y].getX();
this.outputSlots[y].xPos = this.outputSlots[y].getX();
}
}
else
{
this.craftSlot.xDisplayPosition = this.craftSlot.getX();
this.craftSlot.xPos = this.craftSlot.getX();
for( int y = 0; y < 3; y++ )
{
this.outputSlots[y].xDisplayPosition = -9000;
this.outputSlots[y].xPos = -9000;
}
}
}
@Override
public void putStackInSlot( final int par1, final ItemStack par2ItemStack )
public void putStackInSlot( int slotID, ItemStack stack )
{
super.putStackInSlot( par1, par2ItemStack );
this.getAndUpdateOutput();
}
@Override
public void putStacksInSlots( final ItemStack[] par1ArrayOfItemStack )
{
super.putStacksInSlots( par1ArrayOfItemStack );
super.putStackInSlot( slotID, stack );
this.getAndUpdateOutput();
}
@@ -166,7 +159,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
ic.setInventorySlotContents( x, this.crafting.getStackInSlot( x ) );
}
final ItemStack is = CraftingManager.getInstance().findMatchingRecipe( ic, this.getPlayerInv().player.worldObj );
final ItemStack is = CraftingManager.getInstance().findMatchingRecipe( ic, this.getPlayerInv().player.world );
this.cOut.setInventorySlotContents( 0, is );
return is;
}
@@ -210,8 +203,8 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
}
// remove one, and clear the input slot.
output.stackSize--;
if( output.stackSize == 0 )
output.setCount( output.getCount() );
if( output.getCount() == 0 )
{
this.patternSlotIN.putStack( null );
}
@@ -277,7 +270,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
{
final ItemStack out = this.getAndUpdateOutput();
if( out != null && out.stackSize > 0 )
if( out != null && out.getCount() > 0 )
{
return new ItemStack[] { out };
}
@@ -291,7 +284,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
{
final ItemStack out = outputSlot.getStack();
if( out != null && out.stackSize > 0 )
if( out != null && out.getCount() > 0 )
{
list.add( out );
hasValue = true;
@@ -391,7 +384,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
ic.setInventorySlotContents( x, packetPatternSlot.pattern[x] == null ? null : packetPatternSlot.pattern[x].getItemStack() );
}
final IRecipe r = Platform.findMatchingRecipe( ic, p.worldObj );
final IRecipe r = Platform.findMatchingRecipe( ic, p.world );
if( r == null )
{
@@ -407,17 +400,17 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
{
if( ic.getStackInSlot( x ) != null )
{
final ItemStack pulled = Platform.extractItemsByRecipe( this.getPowerSource(), this.getActionSource(), storage, p.worldObj, r, is, ic, ic.getStackInSlot( x ), x, all, Actionable.MODULATE, ItemViewCell.createFilter( this.getViewCells() ) );
final ItemStack pulled = Platform.extractItemsByRecipe( this.getPowerSource(), this.getActionSource(), storage, p.world, r, is, ic, ic.getStackInSlot( x ), x, all, Actionable.MODULATE, ItemViewCell.createFilter( this.getViewCells() ) );
real.setInventorySlotContents( x, pulled );
}
}
final IRecipe rr = Platform.findMatchingRecipe( real, p.worldObj );
final IRecipe rr = Platform.findMatchingRecipe( real, p.world );
if( rr == r && Platform.itemComparisons().isSameItem( rr.getCraftingResult( real ), is ) )
{
final SlotCrafting sc = new SlotCrafting( p, real, this.cOut, 0, 0, 0 );
sc.onPickupFromSlot( p, is );
sc.onTake( p, is );
for( int x = 0; x < real.getSizeInventory(); x++ )
{