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
@@ -203,7 +203,7 @@ public abstract class AEBaseContainer extends Container
final NBTTagCompound data = CompressedStreamTools.readCompressed( new ByteArrayInputStream( buffer ) );
if( data != null )
{
this.setTargetStack( AEApi.instance().storage().createItemStack( ItemStack.loadItemStackFromNBT( data ) ) );
this.setTargetStack( AEApi.instance().storage().createItemStack( new ItemStack( data ) ) );
}
}
catch( final IOException e )
@@ -583,17 +583,17 @@ public abstract class AEBaseContainer extends Container
maxSize = d.getSlotStackLimit();
}
int placeAble = maxSize - t.stackSize;
int placeAble = maxSize - t.getCount();
if( tis.stackSize < placeAble )
if( tis.getCount() < placeAble )
{
placeAble = tis.stackSize;
placeAble = tis.getCount();
}
t.stackSize += placeAble;
tis.stackSize -= placeAble;
t.setCount( t.getCount() + placeAble );
tis.setCount( tis.getCount() - placeAble );
if( tis.stackSize <= 0 )
if( tis.getCount() <= 0 )
{
clickSlot.putStack( null );
d.onSlotChanged();
@@ -635,17 +635,17 @@ public abstract class AEBaseContainer extends Container
maxSize = d.getSlotStackLimit();
}
int placeAble = maxSize - t.stackSize;
int placeAble = maxSize - t.getCount();
if( tis.stackSize < placeAble )
if( tis.getCount() < placeAble )
{
placeAble = tis.stackSize;
placeAble = tis.getCount();
}
t.stackSize += placeAble;
tis.stackSize -= placeAble;
t.setCount( t.getCount() + placeAble );
tis.setCount( tis.getCount() - placeAble );
if( tis.stackSize <= 0 )
if( tis.getCount() <= 0 )
{
clickSlot.putStack( null );
d.onSlotChanged();
@@ -673,15 +673,15 @@ public abstract class AEBaseContainer extends Container
}
final ItemStack tmp = tis.copy();
if( tmp.stackSize > maxSize )
if( tmp.getCount() > maxSize )
{
tmp.stackSize = maxSize;
tmp.setCount( maxSize );
}
tis.stackSize -= tmp.stackSize;
tis.setCount( tis.getCount() - tmp.getCount() );
d.putStack( tmp );
if( tis.stackSize <= 0 )
if( tis.getCount() <= 0 )
{
clickSlot.putStack( null );
d.onSlotChanged();
@@ -726,7 +726,7 @@ public abstract class AEBaseContainer extends Container
{
if( this.tileEntity instanceof IInventory )
{
return ( (IInventory) this.tileEntity ).isUseableByPlayer( entityplayer );
return ( (IInventory) this.tileEntity ).isUsableByPlayer( entityplayer );
}
return true;
}
@@ -781,7 +781,7 @@ public abstract class AEBaseContainer extends Container
if( hand != null )
{
final ItemStack is = hand.copy();
is.stackSize = 1;
is.setCount( 1 );
s.putStack( is );
}
@@ -793,16 +793,16 @@ public abstract class AEBaseContainer extends Container
{
if( hand == null )
{
is.stackSize = Math.max( 1, is.stackSize - 1 );
is.setCount( Math.max( 1, is.getCount() - 1 ) );
}
else if( hand.isItemEqual( is ) )
{
is.stackSize = Math.min( is.getMaxStackSize(), is.stackSize + 1 );
is.setCount(Math.min( is.getMaxStackSize(), is.getCount() + 1 ));
}
else
{
is = hand.copy();
is.stackSize = 1;
is.setCount( 1 );
}
s.putStack( is );
@@ -810,7 +810,7 @@ public abstract class AEBaseContainer extends Container
else if( hand != null )
{
is = hand.copy();
is.stackSize = 1;
is.setCount( 1 );
s.putStack( is );
}
@@ -863,12 +863,12 @@ public abstract class AEBaseContainer extends Container
ais.setStackSize( myItem.getMaxStackSize() );
final InventoryAdaptor adp = InventoryAdaptor.getAdaptor( player, EnumFacing.UP );
myItem.stackSize = (int) ais.getStackSize();
myItem.setCount( (int) ais.getStackSize() );
myItem = adp.simulateAdd( myItem );
if( myItem != null )
{
ais.setStackSize( ais.getStackSize() - myItem.stackSize );
ais.setStackSize( ais.getStackSize() - myItem.getCount() );
}
ais = Platform.poweredExtraction( this.getPowerSource(), this.getCellInventory(), ais, this.getActionSource() );
@@ -923,7 +923,7 @@ public abstract class AEBaseContainer extends Container
if( item != null )
{
if( item.stackSize >= item.getMaxStackSize() )
if( item.getCount() >= item.getMaxStackSize() )
{
liftQty = 0;
}
@@ -1034,8 +1034,8 @@ public abstract class AEBaseContainer extends Container
if( ais == null )
{
final ItemStack is = player.inventory.getItemStack();
is.stackSize--;
if( is.stackSize <= 0 )
is.setCount( is.getCount() - 1 );
if( is.getCount() <= 0 )
{
player.inventory.setItemStack( null );
}
@@ -1048,7 +1048,7 @@ public abstract class AEBaseContainer extends Container
if( player.capabilities.isCreativeMode && slotItem != null )
{
final ItemStack is = slotItem.getItemStack();
is.stackSize = is.getMaxStackSize();
is.setCount( is.getMaxStackSize() );
player.inventory.setItemStack( is );
this.updateHeld( player );
}
@@ -1071,12 +1071,12 @@ public abstract class AEBaseContainer extends Container
ais.setStackSize( myItem.getMaxStackSize() );
final InventoryAdaptor adp = InventoryAdaptor.getAdaptor( player, EnumFacing.UP );
myItem.stackSize = (int) ais.getStackSize();
myItem.setCount( (int) ais.getStackSize() );
myItem = adp.simulateAdd( myItem );
if( myItem != null )
{
ais.setStackSize( ais.getStackSize() - myItem.stackSize );
ais.setStackSize( ais.getStackSize() - myItem.getCount() );
}
ais = Platform.poweredExtraction( this.getPowerSource(), this.getCellInventory(), ais, this.getActionSource() );
@@ -1103,7 +1103,8 @@ public abstract class AEBaseContainer extends Container
{
try
{
NetworkHandler.instance().sendTo( new PacketInventoryAction( InventoryAction.UPDATE_HAND, 0, AEItemStack.create( p.inventory.getItemStack() ) ), p );
NetworkHandler.instance().sendTo( new PacketInventoryAction( InventoryAction.UPDATE_HAND, 0, AEItemStack.create( p.inventory.getItemStack() ) ),
p );
}
catch( final IOException e )
{
@@ -1118,7 +1119,8 @@ public abstract class AEBaseContainer extends Container
{
return input;
}
final IAEItemStack ais = Platform.poweredInsert( this.getPowerSource(), this.getCellInventory(), AEApi.instance().storage().createItemStack( input ), this.getActionSource() );
final IAEItemStack ais = Platform.poweredInsert( this.getPowerSource(), this.getCellInventory(), AEApi.instance().storage().createItemStack( input ),
this.getActionSource() );
if( ais == null )
{
return null;
@@ -1172,7 +1174,8 @@ public abstract class AEBaseContainer extends Container
{
try
{
NetworkHandler.instance().sendTo( new PacketValueConfig( "CustomName", this.getCustomName() ), (EntityPlayerMP) this.getInventoryPlayer().player );
NetworkHandler.instance().sendTo( new PacketValueConfig( "CustomName", this.getCustomName() ),
(EntityPlayerMP) this.getInventoryPlayer().player );
}
catch( final IOException e )
{
@@ -1232,32 +1235,32 @@ public abstract class AEBaseContainer extends Container
ItemStack testB = isA == null ? null : isA.copy();
// can put some back?
if( testA != null && testA.stackSize > a.getSlotStackLimit() )
if( testA != null && testA.getCount() > a.getSlotStackLimit() )
{
if( testB != null )
{
return;
}
final int totalA = testA.stackSize;
testA.stackSize = a.getSlotStackLimit();
final int totalA = testA.getCount();
testA.setCount( a.getSlotStackLimit() );
testB = testA.copy();
testB.stackSize = totalA - testA.stackSize;
testB.setCount( totalA - testA.getCount() );
}
if( testB != null && testB.stackSize > b.getSlotStackLimit() )
if( testB != null && testB.getCount() > b.getSlotStackLimit() )
{
if( testA != null )
{
return;
}
final int totalB = testB.stackSize;
testB.stackSize = b.getSlotStackLimit();
final int totalB = testB.getCount();
testB.setCount( b.getSlotStackLimit() );
testA = testB.copy();
testA.stackSize = totalB - testA.stackSize;
testA.setCount( totalB - testA.getCount() );
}
a.putStack( testA );
@@ -243,7 +243,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
if( i.hasNext() )
{
final ItemStack g = i.next().getItemStack();
g.stackSize = 1;
g.setCount( 1 );
inv.setInventorySlotContents( x, g );
}
else
@@ -331,7 +331,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
}
@Override
public boolean isUseableByPlayer( final EntityPlayer entityplayer )
public boolean isUsableByPlayer( EntityPlayer player )
{
return false;
}
@@ -383,5 +383,12 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
{
ContainerCellWorkbench.this.getCellUpgradeInventory().clear();
}
@Override
public boolean isEmpty()
{
// TODO Auto-generated method stub
return false;
}
}
}
@@ -66,7 +66,7 @@ public class ContainerCraftAmount extends AEBaseContainer
public World getWorld()
{
return this.getPlayerInv().player.worldObj;
return this.getPlayerInv().player.world;
}
public BaseActionSource getActionSrc()
@@ -279,7 +279,7 @@ public class ContainerCraftConfirm extends AEBaseContainer
}
catch( final Throwable e )
{
this.getPlayerInv().player.addChatMessage( new TextComponentString( "Error: " + e.toString() ) );
this.getPlayerInv().player.sendMessage( new TextComponentString( "Error: " + e.toString() ) );
AELog.debug( e );
this.setValidContainer( false );
this.result = null;
@@ -389,7 +389,7 @@ public class ContainerCraftConfirm extends AEBaseContainer
public World getWorld()
{
return this.getPlayerInv().player.worldObj;
return this.getPlayerInv().player.world;
}
public boolean isAutoStart()
@@ -80,7 +80,7 @@ public class ContainerCraftingTerm extends ContainerMEMonitorable implements IAE
ic.setInventorySlotContents( x, this.craftingSlots[x].getStack() );
}
this.outputSlot.putStack( CraftingManager.getInstance().findMatchingRecipe( ic, this.getPlayerInv().player.worldObj ) );
this.outputSlot.putStack( CraftingManager.getInstance().findMatchingRecipe( ic, this.getPlayerInv().player.world ) );
}
@Override
@@ -268,7 +268,7 @@ public final class ContainerInterfaceTerminal extends AEBaseContainer
}
else if( is != null )
{
ItemStack extra = interfaceSlot.removeItems( ( is.stackSize + 1 ) / 2, null, null );
ItemStack extra = interfaceSlot.removeItems( ( is.getCount() + 1 ) / 2, null, null );
if( extra != null )
{
extra = playerHand.addItems( extra );
@@ -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++ )
{
@@ -171,9 +171,9 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
final ItemStack item = this.toolInv.getItemStack();
item.damageItem( 1, this.getPlayerInv().player );
if( item.stackSize == 0 )
if( item.getCount() == 0 )
{
this.getPlayerInv().mainInventory[this.getPlayerInv().currentItem] = null;
this.getPlayerInv().mainInventory.add( this.getPlayerInv().currentItem, null );
MinecraftForge.EVENT_BUS.post( new PlayerDestroyItemEvent( this.getPlayerInv().player, item, null ) );
}
@@ -222,7 +222,7 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
}
@Override
public boolean isUseableByPlayer( final EntityPlayer var1 )
public boolean isUsableByPlayer( EntityPlayer player )
{
return false;
}
@@ -274,4 +274,11 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
{
this.inSlot.setInventorySlotContents( 0, null );
}
@Override
public boolean isEmpty()
{
// TODO Auto-generated method stub
return false;
}
}
@@ -160,7 +160,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
if( i.hasNext() && this.isSlotEnabled( ( x / 9 ) - 2 ) )
{
final ItemStack g = i.next().getItemStack();
g.stackSize = 1;
g.setCount( 1 );
inv.setInventorySlotContents( x, g );
}
else
@@ -51,7 +51,7 @@ public class ContainerWireless extends AEBaseContainer
@Override
public void detectAndSendChanges()
{
final int boosters = this.boosterSlot.getStack() == null ? 0 : this.boosterSlot.getStack().stackSize;
final int boosters = this.boosterSlot.getStack() == null ? 0 : this.boosterSlot.getStack().getCount();
this.setRange( (long) ( 10 * AEConfig.instance().wireless_getMaxRange( boosters ) ) );
this.setDrain( (long) ( 100 * AEConfig.instance().wireless_getPowerDrain( boosters ) ) );
@@ -47,7 +47,7 @@ public class ContainerWirelessTerm extends ContainerMEPortableCell
{
if( Platform.isServer() && this.isValidContainer() )
{
this.getPlayerInv().player.addChatMessage( PlayerMessages.OutOfRange.get() );
this.getPlayerInv().player.sendMessage( PlayerMessages.OutOfRange.get() );
}
this.setValidContainer( false );
@@ -32,6 +32,7 @@ import net.minecraft.item.ItemSword;
import net.minecraft.item.ItemTool;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.stats.AchievementList;
import net.minecraft.util.NonNullList;
public class AppEngCraftingSlot extends AppEngSlot
@@ -85,7 +86,7 @@ public class AppEngCraftingSlot extends AppEngSlot
@Override
protected void onCrafting( final ItemStack par1ItemStack )
{
par1ItemStack.onCrafting( this.thePlayer.worldObj, this.thePlayer, this.amountCrafted );
par1ItemStack.onCrafting( this.thePlayer.world, this.thePlayer, this.amountCrafted );
this.amountCrafted = 0;
if( par1ItemStack.getItem() == Item.getItemFromBlock( Blocks.CRAFTING_TABLE ) )
@@ -140,7 +141,7 @@ public class AppEngCraftingSlot extends AppEngSlot
}
@Override
public void onPickupFromSlot( final EntityPlayer playerIn, final ItemStack stack )
public ItemStack onTake( final EntityPlayer playerIn, final ItemStack stack )
{
net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerCraftingEvent( playerIn, stack, this.craftMatrix );
this.onCrafting( stack );
@@ -152,7 +153,7 @@ public class AppEngCraftingSlot extends AppEngSlot
ic.setInventorySlotContents( x, this.craftMatrix.getStackInSlot( x ) );
}
final ItemStack[] aitemstack = CraftingManager.getInstance().getRemainingItems( ic, playerIn.worldObj );
final NonNullList<ItemStack> aitemstack = CraftingManager.getInstance().getRemainingItems( ic, playerIn.world );
for( int x = 0; x < this.craftMatrix.getSizeInventory(); x++ )
{
@@ -161,10 +162,10 @@ public class AppEngCraftingSlot extends AppEngSlot
net.minecraftforge.common.ForgeHooks.setCraftingPlayer( null );
for( int i = 0; i < aitemstack.length; ++i )
for( int i = 0; i < aitemstack.size(); ++i )
{
final ItemStack itemstack1 = this.craftMatrix.getStackInSlot( i );
final ItemStack itemstack2 = aitemstack[i];
final ItemStack itemstack2 = aitemstack.get( i );
if( itemstack1 != null )
{
@@ -183,6 +184,8 @@ public class AppEngCraftingSlot extends AppEngSlot
}
}
}
return stack;
}
/**
@@ -194,7 +197,7 @@ public class AppEngCraftingSlot extends AppEngSlot
{
if( this.getHasStack() )
{
this.amountCrafted += Math.min( par1, this.getStack().stackSize );
this.amountCrafted += Math.min( par1, this.getStack().getCount() );
}
return super.decrStackSize( par1 );
@@ -40,9 +40,9 @@ public class NullSlot extends Slot
}
@Override
public void onPickupFromSlot( final EntityPlayer par1EntityPlayer, final ItemStack par2ItemStack )
public ItemStack onTake( final EntityPlayer par1EntityPlayer, final ItemStack par2ItemStack )
{
return par2ItemStack;
}
@Override
@@ -37,13 +37,13 @@ public class OptionalSlotFakeTypeOnly extends OptionalSlotFake
if( is != null )
{
is = is.copy();
if( is.stackSize > 1 )
if( is.getCount() > 1 )
{
is.stackSize = 1;
is.setCount( 1 );
}
else if( is.stackSize < -1 )
else if( is.getCount() < -1 )
{
is.stackSize = -1;
is.setCount( -1 );
}
}
@@ -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 );
}
}
@@ -33,8 +33,9 @@ public class SlotFake extends AppEngSlot
}
@Override
public void onPickupFromSlot( final EntityPlayer par1EntityPlayer, final ItemStack par2ItemStack )
public ItemStack onTake( final EntityPlayer par1EntityPlayer, final ItemStack par2ItemStack )
{
return par2ItemStack;
}
@Override
@@ -47,7 +47,7 @@ public class SlotFakeBlacklist extends SlotFakeTypeOnly
{
if( this.getHasStack() )
{
return this.getStack().stackSize > 0 ? 16 + 14 : 14;
return this.getStack().getCount() > 0 ? 16 + 14 : 14;
}
return -1;
}
@@ -37,13 +37,13 @@ public class SlotFakeTypeOnly extends SlotFake
if( is != null )
{
is = is.copy();
if( is.stackSize > 1 )
if( is.getCount() > 1 )
{
is.stackSize = 1;
is.setCount( 1 );
}
else if( is.stackSize < -1 )
else if( is.getCount() < -1 )
{
is.stackSize = -1;
is.setCount( -1 );
}
}
@@ -130,7 +130,7 @@ public class SlotRestrictedInput extends AppEngSlot
if( i.getItem() instanceof ICraftingPatternItem )
{
final ICraftingPatternItem b = (ICraftingPatternItem) i.getItem();
final ICraftingPatternDetails de = b.getPatternForItem( i, this.p.player.worldObj );
final ICraftingPatternDetails de = b.getPatternForItem( i, this.p.player.world );
if( de != null )
{
return de.isCraftable();