Class RareCandyEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.RareCandyEvent
public class RareCandyEvent
extends net.minecraftforge.eventbus.api.Event
Event fires whenever a rare candy is attempted to be used on a Pokémon. This event will only fire if they are below pokemonLevel 100 have leveling
turned on. Canceling this event will prevent the interaction from both leveling the Pokémon and also from consuming the item.
-
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
-
Constructor Summary
ConstructorDescriptionRareCandyEvent
(net.minecraft.server.level.ServerPlayer player, PixelmonEntity pixelmon, net.minecraft.world.item.ItemStack usedItem, ExpCandyItem usedCandy) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.server.level.ServerPlayer
net.minecraft.world.item.ItemStack
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Constructor Details
-
RareCandyEvent
public RareCandyEvent(net.minecraft.server.level.ServerPlayer player, PixelmonEntity pixelmon, net.minecraft.world.item.ItemStack usedItem, ExpCandyItem usedCandy)
-
-
Method Details
-
getPixelmon
-
getPlayer
public net.minecraft.server.level.ServerPlayer getPlayer() -
getUsedCandy
-
getUsedItem
public net.minecraft.world.item.ItemStack getUsedItem()
-