Class BerryLeppaItem

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 BerryLeppaItem extends BerryItem
Restores a move's PP by 10.
  • Constructor Details

    • BerryLeppaItem

      public BerryLeppaItem(net.minecraft.world.item.Item.Properties properties)
      Initializes the Berry.
  • Method Details

    • interact

      public boolean interact(PixelmonEntity pokemon, net.minecraft.world.item.ItemStack itemstack, net.minecraft.world.entity.player.Player player)
      Description copied from class: HeldItem
      Overrides the standard held item interaction (equipping the held item) if needed.
      Overrides:
      interact in class HeldItem
      Parameters:
      pokemon - The Pokémon being given the item.
      itemstack - The itemstack used to interact.
      player - The player using the item.
      Returns:
      Whether the item was used.
    • 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.
    • eatBerry

      public void eatBerry(PixelmonWrapper pixelmon)
      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:
      pixelmon - The Pokémon consuming the Berry.
    • applySwitchInEffect

      public void applySwitchInEffect(PixelmonWrapper newPokemon)
      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:
      newPokemon - The Pokémon switching in.
    • useFromBag

      public boolean useFromBag(PixelmonWrapper userWrapper, PixelmonWrapper targetWrapper, net.minecraft.world.item.ItemStack stack, int selectedMove)
      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.
      selectedMove - An integer value that may be used while using the item.
      Returns:
      Whether to remove an instance of the item from the player's inventory.