Port to 1.11
This commit is contained in:
@@ -81,8 +81,9 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPickupFromSlot( final EntityPlayer p, final ItemStack is )
|
||||
public ItemStack onTake( final EntityPlayer p, final ItemStack is )
|
||||
{
|
||||
return is;
|
||||
}
|
||||
|
||||
public void doClick( final InventoryAction action, final EntityPlayer who )
|
||||
@@ -97,7 +98,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
|
||||
}
|
||||
|
||||
final IMEMonitor<IAEItemStack> inv = this.storage.getItemInventory();
|
||||
final int howManyPerCraft = this.getStack().stackSize;
|
||||
final int howManyPerCraft = this.getStack().getCount();
|
||||
int maxTimesToCraft = 0;
|
||||
|
||||
InventoryAdaptor ia = null;
|
||||
@@ -141,7 +142,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
|
||||
{
|
||||
final List<ItemStack> drops = new ArrayList<ItemStack>();
|
||||
drops.add( extra );
|
||||
Platform.spawnDrops( who.worldObj, new BlockPos( (int) who.posX, (int) who.posY, (int) who.posZ ), drops );
|
||||
Platform.spawnDrops( who.world, new BlockPos( (int) who.posX, (int) who.posY, (int) who.posZ ), drops );
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -171,7 +172,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
|
||||
ic.setInventorySlotContents( x, this.getPattern().getStackInSlot( x ) );
|
||||
}
|
||||
|
||||
final IRecipe r = Platform.findMatchingRecipe( ic, p.worldObj );
|
||||
final IRecipe r = Platform.findMatchingRecipe( ic, p.world );
|
||||
|
||||
if( r == null )
|
||||
{
|
||||
@@ -193,7 +194,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
|
||||
}
|
||||
if( !isBad )
|
||||
{
|
||||
super.onPickupFromSlot( p, is );
|
||||
super.onTake( p, is );
|
||||
// actually necessary to cleanup this case...
|
||||
p.openContainer.onCraftMatrixChanged( this.craftInv );
|
||||
return request;
|
||||
@@ -210,7 +211,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
|
||||
{
|
||||
if( this.getPattern().getStackInSlot( x ) != null )
|
||||
{
|
||||
set[x] = Platform.extractItemsByRecipe( this.energySrc, this.mySrc, inv, p.worldObj, r, is, ic, this.getPattern().getStackInSlot( x ), x, all, Actionable.MODULATE, ItemViewCell.createFilter( this.container.getViewCells() ) );
|
||||
set[x] = Platform.extractItemsByRecipe( this.energySrc, this.mySrc, inv, p.world, r, is, ic, this.getPattern().getStackInSlot( x ), x, all, Actionable.MODULATE, ItemViewCell.createFilter( this.container.getViewCells() ) );
|
||||
ic.setInventorySlotContents( x, set[x] );
|
||||
}
|
||||
}
|
||||
@@ -240,7 +241,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
|
||||
|
||||
private void makeItem( final EntityPlayer p, final ItemStack is )
|
||||
{
|
||||
super.onPickupFromSlot( p, is );
|
||||
super.onTake( p, is );
|
||||
}
|
||||
|
||||
private void postCraft( final EntityPlayer p, final IMEMonitor<IAEItemStack> inv, final ItemStack[] set, final ItemStack result )
|
||||
@@ -271,7 +272,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
|
||||
|
||||
if( drops.size() > 0 )
|
||||
{
|
||||
Platform.spawnDrops( p.worldObj, new BlockPos( (int) p.posX, (int) p.posY, (int) p.posZ ), drops );
|
||||
Platform.spawnDrops( p.world, new BlockPos( (int) p.posX, (int) p.posY, (int) p.posZ ), drops );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user