int slot = client.player.getInventory().selectedSlot;
ClientPlayNetworkHandler networkHandler = client.getNetworkHandler();
ItemStack newItemStack = itemStack;
newItemStack.setCount(37);
networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(slot + 36, newItemStack));
client.player.getInventory().setStack(slot, newItemStack);
Ive seen people having the same problem as me, Why does this only make ghost items in the client even when im sending a packet to the server???
I am in creative mode and even have the highest perms even though the only thing needed is to be in creative mode