Interface EntityInteractPacketCallback


public interface EntityInteractPacketCallback
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.fabricmc.fabric.api.event.Event<EntityInteractPacketCallback>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.util.ActionResult
    onEntityInteractPacket(net.minecraft.entity.player.PlayerEntity player, net.minecraft.entity.Entity victim, double maxDistanceSquared)
    Checks player's interaction with entity.
  • Field Details

  • Method Details

    • onEntityInteractPacket

      net.minecraft.util.ActionResult onEntityInteractPacket(net.minecraft.entity.player.PlayerEntity player, net.minecraft.entity.Entity victim, double maxDistanceSquared)
      Checks player's interaction with entity.
      Parameters:
      player - player trying to interact with entity.
      victim - entity player is trying to interact with.
      maxDistanceSquared - maximal allowed distance for interaction, squared.
      Returns:
      ActionResult.FAIL if player shouldn't be able to interact with the victim, otherwise ActionResult.PASS