类 ItemFishedEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.living.LivingEvent
net.neoforged.neoforge.event.entity.player.PlayerEvent
net.neoforged.neoforge.event.entity.player.ItemFishedEvent
- 所有已实现的接口:
net.neoforged.bus.api.ICancellableEvent
This event is called when a player fishes an item.
This event is
ICancellableEvent
Canceling the event will cause the player to receive no items at all.
The hook will still take the damage specified-
嵌套类概要
从类继承的嵌套类/接口 net.neoforged.neoforge.event.entity.player.PlayerEvent
PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.ItemCraftedEvent, PlayerEvent.ItemSmeltedEvent, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.PlayerChangedDimensionEvent, PlayerEvent.PlayerChangeGameModeEvent, PlayerEvent.PlayerLoggedInEvent, PlayerEvent.PlayerLoggedOutEvent, PlayerEvent.PlayerRespawnEvent, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.TabListNameFormat
从类继承的嵌套类/接口 net.neoforged.neoforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingVisibilityEvent
从类继承的嵌套类/接口 net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
damageRodBy
(int rodDamage) Specifies the amount of damage that the fishing rod should take.getDrops()
Use this to get the items the player will receive.Use this to stuff related to the hook itself, like the position of the bobber.int
Get the damage the rod will take.从类继承的方法 net.neoforged.neoforge.event.entity.player.PlayerEvent
getEntity
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
字段详细资料
-
stacks
-
hook
-
rodDamage
private int rodDamage
-
-
构造器详细资料
-
ItemFishedEvent
-
-
方法详细资料
-
getRodDamage
public int getRodDamage()Get the damage the rod will take.- 返回:
- The damage the rod will take
-
damageRodBy
public void damageRodBy(@Nonnegative int rodDamage) Specifies the amount of damage that the fishing rod should take. This is not added to the pre-existing damage to be taken.- 参数:
rodDamage
- The damage the rod will take. Must be nonnegative
-
getDrops
Use this to get the items the player will receive. You cannot use this to modify the drops the player will get. If you want to affect the loot, you should use LootTables. -
getHookEntity
Use this to stuff related to the hook itself, like the position of the bobber.
-