UseBlockCallback called multiple times for one click
phase opened this issue · 6 comments
UseBlockCallback.EVENT.register((player, world, hand, hitResult) -> {
System.out.println("hit thing");
});
If I right click a block with an empty hand, this is printed out 4 times.
If I place a block, this is printed 2 times.
I'm using 19w07a.
It's called once on the server and client. Being called twice on each is definitely a bit odd, though.
How do I know that who call UseBlockCallback?
(client or server)
world.isClient() will return true if it is on the client, and false on the server.