public class ItemFishedEvent extends PlayerEvent
Cancelable
Canceling the event will cause the player to receive no items at all.
The hook will still take the damage specifiedPlayerEvent.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
Modifier and Type | Field and Description |
---|---|
private EntityFishHook |
hook |
private int |
rodDamage |
private NonNullList<ItemStack> |
stacks |
Constructor and Description |
---|
ItemFishedEvent(java.util.List<ItemStack> stacks,
int rodDamage,
EntityFishHook hook) |
Modifier and Type | Method and Description |
---|---|
void |
damageRodBy(int rodDamage)
Specifies the amount of damage that the fishing rod should take.
|
NonNullList<ItemStack> |
getDrops()
Use this to get the items the player will receive.
|
EntityFishHook |
getHookEntity()
Use this to stuff related to the hook itself, like the position of the bobber.
|
int |
getRodDamage()
Get the damage the rod will take.
|
getEntityPlayer
getEntityLiving
getEntity
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
private final NonNullList<ItemStack> stacks
private final EntityFishHook hook
private int rodDamage
public ItemFishedEvent(java.util.List<ItemStack> stacks, int rodDamage, EntityFishHook hook)
public int getRodDamage()
public void damageRodBy(@Nonnegative int rodDamage)
rodDamage
- The damage the rod will take. Must be nonnegativepublic NonNullList<ItemStack> getDrops()
public EntityFishHook getHookEntity()