Fixed issue with Terminal Inventories on Servers.

This commit is contained in:
AlgorithmX2
2014-02-09 18:56:35 -06:00
parent bc9cc1b9f3
commit 9f26cc0b43
3 changed files with 37 additions and 7 deletions
@@ -8,6 +8,7 @@ import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import appeng.api.storage.data.IAEItemStack;
import appeng.client.ClientHelper;
import appeng.container.AEBaseContainer;
import appeng.core.sync.AppEngPacket;
import appeng.core.sync.network.INetworkInfo;
@@ -43,6 +44,18 @@ public class PacketInventoryAction extends AppEngPacket
}
}
@Override
public void clientPacketData(INetworkInfo network, AppEngPacket packet, EntityPlayer player)
{
if ( action == InventoryAction.UPDATE_HAND )
{
if ( slotItem == null )
ClientHelper.proxy.getPlayers().get( 0 ).inventory.setItemStack( null );
else
ClientHelper.proxy.getPlayers().get( 0 ).inventory.setItemStack( slotItem.getItemStack() );
}
}
// api
public PacketInventoryAction(InventoryAction action, int slot, IAEItemStack slotItem) throws IOException {
this.action = action;