public class ArrowLooseEvent extends PlayerEvent
ItemBow#onPlayerStoppedUsing(ItemStack, World, EntityLivingBase, int)
.bow
contains the ItemBow ItemStack that was used in this event.charge
contains the value for how much the player had charged before stopping the shot.Cancelable
.HasResult
MinecraftForge.EVENT_BUS
.PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.ItemCraftedEvent, PlayerEvent.ItemPickupEvent, PlayerEvent.ItemSmeltedEvent, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.PlayerChangedDimensionEvent, PlayerEvent.PlayerLoggedInEvent, PlayerEvent.PlayerLoggedOutEvent, PlayerEvent.PlayerRespawnEvent, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.Visibility
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.EyeHeight
Modifier and Type | Field and Description |
---|---|
private ItemStack |
bow |
private int |
charge |
private boolean |
hasAmmo |
private World |
world |
Constructor and Description |
---|
ArrowLooseEvent(PlayerEntity player,
ItemStack bow,
World world,
int charge,
boolean hasAmmo) |
Modifier and Type | Method and Description |
---|---|
ItemStack |
getBow() |
int |
getCharge() |
World |
getWorld() |
boolean |
hasAmmo() |
void |
setCharge(int charge) |
getPlayer
getEntityLiving
getEntity
private final ItemStack bow
private final World world
private final boolean hasAmmo
private int charge
public ArrowLooseEvent(PlayerEntity player, @Nonnull ItemStack bow, World world, int charge, boolean hasAmmo)