Interface UseEntityCallback
public interface UseEntityCallback
Callback for right-clicking ("using") an entity.
Is hooked in before the spectator check, so make sure to check for the player's game mode as well!
On the logical client, the return values have the following meaning:
- SUCCESS cancels further processing, causes a hand swing, and sends a packet to the server.
- CONSUME cancels further processing, and sends a packet to the server. It does NOT cause a hand swing.
- PASS falls back to further processing.
- FAIL cancels further processing and does not send a packet to the server.
On the logical server, the return values have the following meaning:
- PASS falls back to further processing.
- Any other value cancels further processing.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.InteractionResultinteract(net.minecraft.world.entity.player.Player player, net.minecraft.world.level.Level level, net.minecraft.world.InteractionHand hand, net.minecraft.world.entity.Entity entity, net.minecraft.world.phys.EntityHitResult hitResult)
-
Field Details
-
EVENT
-
-
Method Details
-
interact
net.minecraft.world.InteractionResult interact(net.minecraft.world.entity.player.Player player, net.minecraft.world.level.Level level, net.minecraft.world.InteractionHand hand, net.minecraft.world.entity.Entity entity, net.minecraft.world.phys.EntityHitResult hitResult)
-