public void serverPacketData(INetworkInfo manager, AppEngPacket packet, EntityPlayer player)
{
EntityPlayerMP sender = (EntityPlayerMP) player;
if ( sender.openContainer instanceof AEBaseContainer )
{
AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer;
if ( action == InventoryAction.AUTO_CRAFT )
{
ContainerOpenContext context = baseContainer.openContext;
if ( context != null )
{
TileEntity te = context.getTile();
Platform.openGUI( sender, te, baseContainer.openContext.side, GuiBridge.GUI_CRAFTING_AMOUNT );
if ( sender.openContainer instanceof ContainerCraftAmount )
{
ContainerCraftAmount cca = (ContainerCraftAmount) sender.openContainer;
if ( baseContainer.getTargetStack() != null )
{
cca.craftingItem.putStack( baseContainer.getTargetStack().getItemStack() );
cca.whatToMake = baseContainer.getTargetStack();
}
cca.detectAndSendChanges();
}
}
}
else
{
baseContainer.doAction( sender, action, slot, id );
}
}
}