Class LureExpiredEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.lures.LureExpiredEvent
public class LureExpiredEvent
extends net.minecraftforge.eventbus.api.Event
Event fired when a lure has completely expired. This occurs when the item damage
of a lure reaches
Cancelling this event will prevent the lure from being destroyed and will set the remaining item durability to
128
. A lure casing will be returned to the player
if this event fires without being cancelled. The casing item stack can be modified
in this event. Cancelling this event will prevent the lure from being destroyed and will set the remaining item durability to
1
. It will also prevent a lure casing
from being given to the player. - Since:
- January 12, 2020
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionnet.minecraft.world.item.ItemStack
The item stack representing the casing that will be returned to the player afterwards.final LureItem
The specific lure item.final net.minecraft.world.item.ItemStack
The item stack representing the lure.final PlayerPartyStorage
ThePlayerPartyStorage
that the lure is housed in.final net.minecraft.server.level.ServerPlayer
The player whose lure has expired. -
Constructor Summary
-
Method Summary
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
player
public final net.minecraft.server.level.ServerPlayer playerThe player whose lure has expired. -
party
ThePlayerPartyStorage
that the lure is housed in. -
lureStack
public final net.minecraft.world.item.ItemStack lureStackThe item stack representing the lure. -
lure
The specific lure item. -
casingStack
public net.minecraft.world.item.ItemStack casingStackThe item stack representing the casing that will be returned to the player afterwards. This can be modified.
-
-
Constructor Details
-
LureExpiredEvent
public LureExpiredEvent(net.minecraft.server.level.ServerPlayer player)
-
-
Method Details
-
getType
Gets the lure type. -
getStrength
Gets the lure strength.
-