Hello community,
I'm struggling with the LivingEntityUseItemEvent.Finish-Event...
I want to have a reaction, when the player drinks something, so I made a Listener, that listens to the LivingEntityUseItemEvent.Finish.
When I call e.getItem(), then it just returns the ItemStack.EMPTY.
The e.getResultStack() works well, but the e.getItem() is buggy, I think.
It happens, when I drink a potion (the potion probably gets ItemStack.EMPTY for a tick, when the event gets fired, and then it gets the Glass Bottle Item).
is that a bug or am I doing something wrong?
@SubscribeEvent
public void onItemUse(LivingEntityUseItemEvent.Finish e) {
System.out.println(e.getItem());
}
Edit 1: I forgot to say, that this happens on both Client and Server Side!