swap Item To Slot
Swaps the item in sourceSlot to the targetSlot in your hotbar.
Keep in mind that this swap is not instantaneous it gets queued to happen at the end of the tick. Use mc.thePlayer.inventory.currentItem as target if you want to swap the item to the currently selected hotbar slot.
Return
true if the swap was successful, false otherwise.
See also
Parameters
the slot in your hotbar that the item should be swapped to. Hsa to be in between 0 and 8.
Looks for the specified item in your inventory queues to and swaps it to the specified target slot.
Keep in mind that this swap is not instantaneous it gets queued to happen at the end of the tick. Use mc.thePlayer.inventory.currentItem as target if you want to swap the item to the currently selected hotbar slot.
Return
true if the swap was successful, false otherwise.
See also
Parameters
the slot in your hotbar that the item should be swapped to. Hsa to be in between 0 and 8.
Specify what to check for finding the item. 0: display name and item id. 1: only display name. 2: only itemID.