package packets.s2cpackets;
import datatypes.MCItemSlot;
import packets.SPacket;
import entities.Player;
public class S0x05 extends SPacket {
public S0x05(Player player) {
super(0x05);
addInt(player.geteid());
addShort((short) 0x00); // 0 = held item changed
try {
MCItemSlot itemslot = player.getHeldItemAtSlot(player.getSelectedSlot());
addShort(itemslot.getItem().getItemId());
addShort(itemslot.getMetaData());
} catch (Exception e) {
addShort((short) 0x00);
addShort((short) 0x00);
}
}
}