Advertisement
LexManos

Item Clicking Thoughts

Feb 12th, 2012
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. Entity:
  2. Left Click:
  3. EntityPlayer.attackTargetWithCurrentItem:
  4. ItemStack stack = getCurrentEquippedItem();
  5. if (stack != null && stack.getItem().onLeftClickEntity(stack, this, entity))
  6. {
  7. return;
  8. }
  9. Right Click:
  10. Alredy exists
  11.  
  12. Blocks:
  13. Left Click:
  14. Can Only send 1st and Last click to server...
  15. Due to how the server calculates the 'clicking' of blocks when mining, we don't get a correct block-hit event.
  16. So we have the already existing Item.onBlockStartBreak
  17. Right Click:
  18. We have onItemUseFirst
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement