Class BerryCustapItem

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 BerryCustapItem extends BerryItem
Allows the user to have higher priority once when at low health.
  • Field Details

    • priorityModifier

      protected float priorityModifier
    • checkedThisTurn

      protected boolean checkedThisTurn
  • Constructor Details

    • BerryCustapItem

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

    • applyStartOfTurnEffect

      public void applyStartOfTurnEffect(PixelmonWrapper pokemon)
      Description copied from class: HeldItem
      Triggers at the start of the turn, after switches and evolutions.
      Overrides:
      applyStartOfTurnEffect in class HeldItem
      Parameters:
      pokemon - The Pokémon holding this.
    • modifyPriority

      public float modifyPriority(PixelmonWrapper pokemon, float priority, MutableBoolean triggered)
      Description copied from class: HeldItem
      Modifies the holder's attack's priority.
      Overrides:
      modifyPriority in class HeldItem
      Parameters:
      pokemon - The attack's user.
      priority - The attack's priority.
      triggered - Whether an ability before this also modified priority.
      Returns:
      The modified priority.
    • eatBerry

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