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.minecraftforge.common.extensions.IForgeItem

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

    • onStatModified

      public void onStatModified(PixelmonWrapper holder, PixelmonWrapper affected)
      Description copied from class: HeldItem
      Triggers when a Pokémon's stats are modified.
      Overrides:
      onStatModified in class HeldItem
      Parameters:
      holder - The Pokémon holding the item.
      affected - The Pokémon whose stats were just modified.
    • 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.