so func onUpdate(ItemStack, World, Entity, int, boolean) takes this parameters, but I want to look if player is holding item in offhand, but there's only Entity, not EntityPlayer, what do I do?
Edit: Let me explain, I want to do entity.replaceItemInInventory() but int variable that im gettin is actually same for offhand and mainhand, also armor slots are 1-4, as well as inventory slots.