Class WhiteHerbItem

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

public class WhiteHerbItem extends HeldItem
Restores a Pokémon's stats if they are lowered.
  • Constructor Details

    • WhiteHerbItem

      public WhiteHerbItem()
      Initializes the held item.
  • Method Details

    • postProcessAttackUserHitOrMiss

      public void postProcessAttackUserHitOrMiss(PixelmonWrapper attacker, PixelmonWrapper target)
      Description copied from class: HeldItem
      Triggers after the Pokémon attacks, no matter if the Pokémon hits or misses.
      Overrides:
      postProcessAttackUserHitOrMiss in class HeldItem
      Parameters:
      attacker - The Pokémon with the held item.
      target - The attack's target.
    • postProcessAttackTargetHitOrMiss

      public void postProcessAttackTargetHitOrMiss(PixelmonWrapper attacker, PixelmonWrapper target)
      Description copied from class: HeldItem
      Triggers after the Pokémon attacks, no matter if the Pokémon hits or misses.
      Overrides:
      postProcessAttackTargetHitOrMiss in class HeldItem
      Parameters:
      attacker - The Pokémon with the held item.
      target - The attack's target.
    • useFromBag

      public boolean useFromBag(PixelmonWrapper userWrapper, PixelmonWrapper targetWrapper, net.minecraft.world.item.ItemStack stack)
      Description copied from class: PixelmonItem
      Uses the item in battle.
      Overrides:
      useFromBag in class PixelmonItem
      Parameters:
      userWrapper - The Pokémon whose turn is being spent using the item.
      targetWrapper - The Pokémon the item is being used on.
      stack - The item stack used.
      Returns:
      Whether to remove an instance of the item from the player's inventory.
    • healStats

      public static boolean healStats(PixelmonWrapper affected)
      Heals any lowered stats on the Pokémon.
      Parameters:
      affected - The Pokémon being healed.
      Returns:
      Whether any stats were healed.