Class ChoiceItem

java.lang.Object
net.minecraft.world.item.Item
All Implemented Interfaces:
ITranslatable, net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.ItemLike, net.minecraftforge.common.extensions.IForgeItem

public class ChoiceItem extends HeldItem
Raises a stat by 1.5x, but locks the user into a single move while in battle.
  • Constructor Details

    • ChoiceItem

      public ChoiceItem(BattleStatsType choiceItemType)
      Initializes a choice item.
      Parameters:
      choiceItemType - The type of choice item.
  • Method Details

    • onAttackUsed

      public void onAttackUsed(PixelmonWrapper user, Attack attack)
      Description copied from class: HeldItem
      Triggers when the holder uses an attack.
      Overrides:
      onAttackUsed in class HeldItem
      Parameters:
      user - The attack's user.
      attack - The attack.
    • applySwitchInEffect

      public void applySwitchInEffect(PixelmonWrapper pw)
      Description copied from class: HeldItem
      Triggers when the holder switches in and when a Pokémon receives a held item in battle.
      Overrides:
      applySwitchInEffect in class HeldItem
      Parameters:
      pw - The Pokémon switching in.
    • applySwitchOutEffect

      public void applySwitchOutEffect(PixelmonWrapper pw)
      Description copied from class: HeldItem
      Triggers when the holder switches out.
      Overrides:
      applySwitchOutEffect in class HeldItem
      Parameters:
      pw - The Pokémon switching out.
    • modifyStats

      public int[] modifyStats(PixelmonWrapper user, int[] stats)
      Description copied from class: HeldItem
      Modifies the Pokémon's stats at the beginning of a battle turn.
      Overrides:
      modifyStats in class HeldItem
      Parameters:
      user - The Pokémon.
      stats - The Pokémon's stats.
      Returns:
      The modified stats.
    • applyRepeatedEffect

      public void applyRepeatedEffect(PixelmonWrapper pokemon)
      Description copied from class: HeldItem
      Triggers at the end of every turn.
      Overrides:
      applyRepeatedEffect in class HeldItem
      Parameters:
      pokemon - The holder.