Class ArrowNockEvent
- 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.ArrowNockEvent
-
public class ArrowNockEvent extends PlayerEvent
ArrowNockEvent is fired when a player begins using a bow.
This event is fired whenever a player begins using a bow inItemBow#onItemRightClick(World, EntityPlayer, EnumHand)
.
This event is fired on theMinecraftForge.EVENT_BUS
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.player.PlayerEvent
PlayerEvent.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.TabListNameFormat, PlayerEvent.Visibility
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent, LivingEvent.LivingVisibilityEvent
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.Size
-
-
Constructor Summary
Constructors Constructor Description ArrowNockEvent(PlayerEntity player, ItemStack item, Hand hand, World world, boolean hasAmmo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActionResult<ItemStack>
getAction()
ItemStack
getBow()
Hand
getHand()
World
getWorld()
boolean
hasAmmo()
void
setAction(ActionResult<ItemStack> action)
-
Methods inherited from class net.minecraftforge.event.entity.player.PlayerEvent
getPlayer
-
Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityLiving
-
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
-
-
-
-
Field Detail
-
bow
private final ItemStack bow
-
hand
private final Hand hand
-
world
private final World world
-
hasAmmo
private final boolean hasAmmo
-
action
private ActionResult<ItemStack> action
-
-
Constructor Detail
-
ArrowNockEvent
public ArrowNockEvent(PlayerEntity player, @Nonnull ItemStack item, Hand hand, World world, boolean hasAmmo)
-
-
Method Detail
-
getBow
@Nonnull public ItemStack getBow()
-
getWorld
public World getWorld()
-
getHand
public Hand getHand()
-
hasAmmo
public boolean hasAmmo()
-
getAction
public ActionResult<ItemStack> getAction()
-
setAction
public void setAction(ActionResult<ItemStack> action)
-
-