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

    Constructors
    Constructor
    Description
    RareCandyEvent(net.minecraft.server.level.ServerPlayer player, PixelmonEntity pixelmon, net.minecraft.world.item.ItemStack usedItem, ExpCandyItem usedCandy)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    net.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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RareCandyEvent

      public RareCandyEvent(net.minecraft.server.level.ServerPlayer player, PixelmonEntity pixelmon, net.minecraft.world.item.ItemStack usedItem, ExpCandyItem usedCandy)
  • Method Details

    • getPixelmon

      public PixelmonEntity getPixelmon()
    • getPlayer

      public net.minecraft.server.level.ServerPlayer getPlayer()
    • getUsedCandy

      public ExpCandyItem getUsedCandy()
    • getUsedItem

      public net.minecraft.world.item.ItemStack getUsedItem()