-
Notifications
You must be signed in to change notification settings - Fork 146
Closed
Labels
Milestone
Description
I noticed that the handling of the Creative Item packet doesn't take into account the "raw slot" logic:
Essentially,
packet.slotwon't match the "inventory slot" properly. For example, "Creative Slot #0" > is not the hotbar, but the helmet slot. This mapping depends on the "top view" and "bottom view" of the inventory (think of the slots in a crafting bench, vs. the slots in a survival inventory with the equipment).In Bukkit, there is this concept of "InventoryView" which has a convert-slot function to handle this.
This is an issue because there is a desync as to which item is currently held by the player: using the "hotbar index" for the inventory slot will give the wrong item.
Originally posted by @Momothereal in #46 (comment)