public static class PlayerInteractEvent.RightClickItem extends PlayerInteractEvent
Item.onItemRightClick(net.minecraft.world.World, net.minecraft.entity.player.EntityPlayer, net.minecraft.util.EnumHand)
.
Note that this is NOT fired if the player is targeting a block PlayerInteractEvent.RightClickBlock
or entity PlayerInteractEvent.EntityInteract
PlayerInteractEvent.EntityInteractSpecific
.
Let result be the return value of Item.onItemRightClick(net.minecraft.world.World, net.minecraft.entity.player.EntityPlayer, net.minecraft.util.EnumHand)
, or PlayerInteractEvent.cancellationResult
if the event is cancelled.
If we are on the client and result is not EnumActionResult.SUCCESS
, the client will then continue to other hands.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 |
---|
RightClickItem(EntityPlayer player,
EnumHand hand) |
getCancellationResult, getFace, getHand, getItemStack, getPos, getSide, getWorld, setCancellationResult
getEntityPlayer
getEntityLiving
getEntity
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
public RightClickItem(EntityPlayer player, EnumHand hand)