public static class PlayerInteractEvent.EntityInteractSpecific extends PlayerInteractEvent
Entity.applyPlayerInteraction(net.minecraft.entity.player.PlayerEntity, net.minecraft.util.math.Vec3d, net.minecraft.util.Hand) is called.
Let result be the return value of Entity.applyPlayerInteraction(net.minecraft.entity.player.PlayerEntity, net.minecraft.util.math.Vec3d, net.minecraft.util.Hand), or PlayerInteractEvent.cancellationResult if the event is cancelled.
If we are on the client and result is not EnumActionResult#SUCCESS, the client will then try PlayerInteractEvent.EntityInteract.PlayerInteractEvent.EntityInteract, PlayerInteractEvent.EntityInteractSpecific, PlayerInteractEvent.LeftClickBlock, PlayerInteractEvent.LeftClickEmpty, PlayerInteractEvent.RightClickBlock, PlayerInteractEvent.RightClickEmpty, PlayerInteractEvent.RightClickItemPlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.ItemCraftedEvent, PlayerEvent.ItemPickupEvent, PlayerEvent.ItemSmeltedEvent, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.PlayerChangedDimensionEvent, PlayerEvent.PlayerLoggedInEvent, PlayerEvent.PlayerLoggedOutEvent, PlayerEvent.PlayerRespawnEvent, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.VisibilityLivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEventEntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.EyeHeight| Modifier and Type | Field and Description |
|---|---|
private Vec3d |
localPos |
private Entity |
target |
| Constructor and Description |
|---|
EntityInteractSpecific(PlayerEntity player,
Hand hand,
Entity target,
Vec3d localPos) |
| Modifier and Type | Method and Description |
|---|---|
Vec3d |
getLocalPos()
Returns the local interaction position.
|
Entity |
getTarget() |
getCancellationResult, getFace, getHand, getItemStack, getPos, getSide, getWorld, setCancellationResultgetPlayergetEntityLivinggetEntitypublic EntityInteractSpecific(PlayerEntity player, Hand hand, Entity target, Vec3d localPos)
public Vec3d getLocalPos()
public Entity getTarget()