Class BerryGinemaItem

All Implemented Interfaces:
ITranslatable, net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.ItemLike, net.minecraftforge.common.extensions.IForgeItem, net.minecraftforge.common.IPlantable

public class BerryGinemaItem extends BerryItem
Restores the Pokémon's stats if they are lowered.
  • Constructor Details

    • BerryGinemaItem

      public BerryGinemaItem(net.minecraft.world.item.Item.Properties properties)
      Initializes the Berry.
  • 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.
    • eatBerry

      public void eatBerry(PixelmonWrapper affected)
      Description copied from class: HeldItem
      Called within Berry classes after determining whether or not the Berry will be eaten. Also called directly by certain moves (e.g., Bug Bite, Pluck).
      Overrides:
      eatBerry in class HeldItem
      Parameters:
      affected - The Pokémon consuming the Berry.
    • 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.