Punch dropped item.

Discussion in 'Plugin Development' started by Capby, Aug 7, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    Capby

    Is there a way to punch a dropped item like when you punch a mob so it flies backwards?
     
  2. Offline

    EvilWitchdoctor

    I can think of two ways to do this:

    1) put some invisible mob, such as an armor stand, riding the item entity, and detect when the player punches that.
    2) use PlayerInteractEvent and if Action.LEFT_CLICK_AIR or Action.LEFT_CLICK_BLOCK then look for items in front of the player (using their facing direction)

    If you need more help implementing either of these tahg me ;)
     
Thread Status:
Not open for further replies.

Share This Page