public static class PlayerInteractEvent.EntityInteract extends PlayerInteractEvent
PlayerInteractEvent.EntityInteractSpecific
, except for the case
where the above call to Entity.applyPlayerInteraction(net.minecraft.entity.player.EntityPlayer, net.minecraft.util.math.Vec3d, net.minecraft.util.EnumHand)
returns EnumActionResult.SUCCESS
.
In that case, general entity interactions, and hence this event, will not be called. See the above javadoc for more details.
This event's state affects whether Entity.processInitialInteract(net.minecraft.entity.player.EntityPlayer, net.minecraft.util.EnumHand)
and Item.itemInteractionForEntity(net.minecraft.item.ItemStack, net.minecraft.entity.player.EntityPlayer, net.minecraft.entity.EntityLivingBase, net.minecraft.util.EnumHand)
are called.
Canceling the event clientside will cause processing to continue to PlayerInteractEvent.RightClickItem
,
while canceling serverside will simply do no further processing.PlayerInteractEvent.EntityInteract, PlayerInteractEvent.EntityInteractSpecific, PlayerInteractEvent.LeftClickBlock, PlayerInteractEvent.LeftClickEmpty, PlayerInteractEvent.RightClickBlock, PlayerInteractEvent.RightClickEmpty, PlayerInteractEvent.RightClickItem
PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.Visibility
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing
Event.HasResult, Event.Result
Constructor and Description |
---|
EntityInteract(EntityPlayer player,
EnumHand hand,
Entity target) |
Modifier and Type | Method and Description |
---|---|
Entity |
getTarget() |
getFace, getHand, getItemStack, getPos, getSide, getWorld
getEntityPlayer
getEntityLiving
getEntity
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
public EntityInteract(EntityPlayer player, EnumHand hand, Entity target)
public Entity getTarget()