Interface EntityInteractPacketCallback
public interface EntityInteractPacketCallback
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.fabricmc.fabric.api.event.Event<EntityInteractPacketCallback>
-
Method Summary
Modifier and TypeMethodDescriptionnet.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
-
EVENT
-
-
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, otherwiseActionResult.PASS
-