Class PlayerInteractEvent.EntityInteractSpecific
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.living.LivingEvent
net.minecraftforge.event.entity.player.PlayerEvent
net.minecraftforge.event.entity.player.PlayerInteractEvent
net.minecraftforge.event.entity.player.PlayerInteractEvent.EntityInteractSpecific
- Enclosing class:
- PlayerInteractEvent
This event is fired on both sides whenever a player right clicks an entity.
 "Interact at" is an interact where the local vector (which part of the entity you clicked) is known.
 The state of this event affects whether 
Entity.interactAt(Player, Vec3, InteractionHand) is called.
 Let result be the return value of Entity.interactAt(Player, Vec3, InteractionHand), or PlayerInteractEvent.cancellationResult if the event is cancelled.
 If we are on the client and result is not InteractionResult.SUCCESS, the client will then try PlayerInteractEvent.EntityInteract.- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraftforge.event.entity.player.PlayerInteractEventPlayerInteractEvent.EntityInteract, PlayerInteractEvent.EntityInteractSpecific, PlayerInteractEvent.LeftClickBlock, PlayerInteractEvent.LeftClickEmpty, PlayerInteractEvent.RightClickBlock, PlayerInteractEvent.RightClickEmpty, PlayerInteractEvent.RightClickItemNested classes/interfaces inherited from class net.minecraftforge.event.entity.player.PlayerEventPlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.ItemCraftedEvent, PlayerEvent.ItemPickupEvent, PlayerEvent.ItemSmeltedEvent, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.PlayerChangedDimensionEvent, PlayerEvent.PlayerChangeGameModeEvent, PlayerEvent.PlayerLoggedInEvent, PlayerEvent.PlayerLoggedOutEvent, PlayerEvent.PlayerRespawnEvent, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.TabListNameFormatNested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEventLivingEvent.LivingJumpEvent, LivingEvent.LivingTickEvent, LivingEvent.LivingVisibilityEventNested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEventEntityEvent.EnteringSection, EntityEvent.EntityConstructingNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Eventnet.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionEntityInteractSpecific(Player player, InteractionHand hand, Entity target, Vec3 localPos) 
- 
Method SummaryModifier and TypeMethodDescriptionReturns the local interaction position.Methods inherited from class net.minecraftforge.event.entity.player.PlayerInteractEventgetCancellationResult, getFace, getHand, getItemStack, getLevel, getPos, getSide, setCancellationResultMethods inherited from class net.minecraftforge.event.entity.player.PlayerEventgetEntityMethods inherited from class net.minecraftforge.eventbus.api.EventgetListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
- 
Field Details- 
localPos
- 
target
 
- 
- 
Constructor Details- 
EntityInteractSpecific
 
- 
- 
Method Details- 
getLocalPosReturns the local interaction position. This is a 3D vector, where (0, 0, 0) is centered exactly at the center of the entity's bounding box at their feet. This means the X and Z values will be in the range [-width / 2, width / 2] while Y values will be in the range [0, height]- Returns:
- The local position
 
- 
getTarget
 
-