Class EjectPackItem

java.lang.Object
net.minecraft.world.item.Item
com.pixelmonmod.pixelmon.items.PixelmonItem
com.pixelmonmod.pixelmon.items.HeldItem
com.pixelmonmod.pixelmon.items.heldItems.EjectPackItem
All Implemented Interfaces:
ITranslatable, net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.ItemLike, net.minecraftforge.common.extensions.IForgeItem

public class EjectPackItem extends HeldItem
Switches out the holder if any of its stats are lowered. https://bulbapedia.bulbagarden.net/wiki/Eject_Pack
  • Constructor Details

    • EjectPackItem

      public EjectPackItem()
  • Method Details

    • onStatDecrease

      public void onStatDecrease(PixelmonWrapper itemHolder, PixelmonWrapper cause, PixelmonWrapper affected, int amount, BattleStatsType stat)
      Description copied from class: HeldItem
      Triggers when a Pokémon's stat is decreased.
      Overrides:
      onStatDecrease in class HeldItem
      Parameters:
      itemHolder - The Pokémon whose item it is.
      cause - The Pokémon that caused stat decrease.
      affected - The Pokémon whose stat was decreased.
      amount - The size of the decrease.
      stat - The stat that was decreased.
    • applyStartOfTurnEffect

      public void applyStartOfTurnEffect(PixelmonWrapper newPokemon)
      Description copied from class: HeldItem
      Triggers at the start of the turn, after switches and evolutions.
      Overrides:
      applyStartOfTurnEffect in class HeldItem
      Parameters:
      newPokemon - The Pokémon holding this.
    • applyEffectAfterAllMoveEffects

      public void applyEffectAfterAllMoveEffects(PixelmonWrapper attacker, PixelmonWrapper defender)
      Description copied from class: HeldItem
      Triggers after all the targets of an attack have defended.
      Overrides:
      applyEffectAfterAllMoveEffects in class HeldItem
      Parameters:
      attacker - The move's user.
      defender - The Pokémon defending from the attacker.
    • applyRepeatedEffectAfterStatus

      public void applyRepeatedEffectAfterStatus(PixelmonWrapper itemHolder)
      Description copied from class: HeldItem
      Triggers at the end of every turn after residual status damage has been applied.
      Overrides:
      applyRepeatedEffectAfterStatus in class HeldItem
      Parameters:
      itemHolder - The holder.
    • checkIfCanSwitchAndThenSwitch

      public void checkIfCanSwitchAndThenSwitch(PixelmonWrapper itemHolder)