public class PlayerInteractEvent extends PlayerEvent
MinecraftForge.EVENT_BUS.
See the individual documentation on each subevent for more details.| Modifier and Type | Class and Description |
|---|---|
static class |
PlayerInteractEvent.EntityInteract
This event is fired on both sides when the player right clicks an entity.
|
static class |
PlayerInteractEvent.EntityInteractSpecific
This event is fired on both sides whenever a player right clicks an entity.
|
static class |
PlayerInteractEvent.LeftClickBlock
This event is fired when a player left clicks while targeting a block.
|
static class |
PlayerInteractEvent.RightClickBlock
This event is fired on both sides whenever the player right clicks while targeting a block.
|
static class |
PlayerInteractEvent.RightClickEmpty
This event is fired on the client side when the player right clicks empty space with an empty hand.
|
static class |
PlayerInteractEvent.RightClickItem
This event is fired on both sides before the player triggers
Item.onItemRightClick(net.minecraft.item.ItemStack, net.minecraft.world.World, net.minecraft.entity.player.EntityPlayer, net.minecraft.util.EnumHand). |
PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTrackingLivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEventEntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructingEvent.HasResult, Event.Result| Modifier and Type | Method and Description |
|---|---|
EnumFacing |
getFace() |
EnumHand |
getHand() |
ItemStack |
getItemStack() |
BlockPos |
getPos()
If the interaction was on an entity, will be a BlockPos centered on the entity.
|
Side |
getSide() |
World |
getWorld() |
getEntityPlayergetEntityLivinggetEntitygetListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setuppublic EnumHand getHand()
@Nullable public ItemStack getItemStack()
public BlockPos getPos()
@Nullable public EnumFacing getFace()
public World getWorld()
public Side getSide()
Side.CLIENT on the client thread, and Side.SERVER on the server thread.