Fixed issue with Terminal Inventories on Servers.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user