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!

Upon return:

  • SUCCESS cancels further processing and, on the client, sends a packet to the server.
  • PASS falls back to further processing.
  • FAIL cancels further processing and does not send a packet to the server.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Event<UseEntityCallback>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.util.ActionResult
    interact(net.minecraft.entity.player.PlayerEntity player, net.minecraft.world.World world, net.minecraft.util.Hand hand, net.minecraft.entity.Entity entity, @Nullable net.minecraft.util.hit.EntityHitResult hitResult)
     
  • Field Details

  • Method Details

    • interact

      net.minecraft.util.ActionResult interact(net.minecraft.entity.player.PlayerEntity player, net.minecraft.world.World world, net.minecraft.util.Hand hand, net.minecraft.entity.Entity entity, @Nullable @Nullable net.minecraft.util.hit.EntityHitResult hitResult)