ItemFishedEvent
Link to itemfishedevent
This event is fired to when a player is about to fish up an item. Cancelling the event will prevent the player from receiving an item, but the rod will still take damage.
Notes
Link to notes
Additional damage can be done to the rod by setting event.additionalDamage
. A list of IItemStacks (which is not modifiable) that are going to be fished up is contained within event.drops
.
Event Class
Link to event-class
You will need to cast the event in the function header as this class:
import crafttweaker.event.ItemFishedEvent;
You can, of course, also import the class before and use that name then.
Event interface extensions
Link to event-interface-extensions
ItemFished Events implement the following interfaces and are able to call all of their methods/getters/setters as well:
ZenGetters/ZenSetters
Link to zengetterszensetters
The following information can be retrieved/set during the event:
ZenGetter | ZenSetter | Type |
---|---|---|
ZenGetter damage | ZenSetter | Type int |
ZenGetter | ZenSetter additionalDamage | Type int |
ZenGetter drops | ZenSetter | Type IItemStack[] |
ZenGetter fishHook | ZenSetter | Type IEntityFishHook |