Posted October 29, 20178 yr I can't seem to figure out how to swap items in inventory so that the server recognises that i did. I read some other forum posts that you need to send packets, but I can't seem to figure them out. I would apreciate if anyone could tell me what packet i need to send and how to do so. Thanks in advance, Jakob99
October 30, 20178 yr Author I've tried using windowClick with no success. Maybe I'm doing something wrong? ItemStack rst = mc.player.inventory.mainInventory.get(8); int potpos = itemStackPos(potst); ItemStack pot = mc.player.inventory.mainInventory.get(potpos); mc.playerController.windowClick(mc.player.inventoryContainer.windowId, 8, 0, ClickType.PICKUP, mc.player); mc.playerController.windowClick(mc.player.inventoryContainer.windowId, potpos, 0, ClickType.SWAP, mc.player); mc.playerController.windowClick(mc.player.inventoryContainer.windowId, 8, 0, ClickType.PICKUP, mc.player);
October 30, 20178 yr Author I ran it through intelliJ and the code definitely ran when I pressed the keybind I specified, but nothing in my inventory changed.
October 30, 20178 yr Author Ok, I figured out what I was doing wrong, i was using the wrong slotID. Thanks for tellong me about PlayerControllerMP::windowClick.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.