Class BerryStatIncreaseItem

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 BerryStatIncreaseItem extends BerryItem
Increases a certain stat when below 25% hp.
  • Constructor Details

    • BerryStatIncreaseItem

      public BerryStatIncreaseItem(net.minecraft.world.item.Item.Properties properties, BerryType berry, BattleStatsType stat)
      Initializes the Berry.
      Parameters:
      berry - The type of the Berry (referenced off main Berry enum).
      stat - The stat increased by the Berry.
  • Method Details

    • tookDamage

      public void tookDamage(PixelmonWrapper attacker, PixelmonWrapper defender, float damage, DamageTypeEnum damageType)
      Description copied from class: HeldItem
      Triggers when the holder takes damage.
      Overrides:
      tookDamage in class HeldItem
      Parameters:
      attacker - The source of the damage.
      defender - The target of the damage.
      damage - The damage dealt.
      damageType - The type of damage that was dealt.
    • 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.
    • applyRepeatedEffect

      public void applyRepeatedEffect(PixelmonWrapper pw)
      Description copied from class: HeldItem
      Triggers at the end of every turn.
      Overrides:
      applyRepeatedEffect in class HeldItem
      Parameters:
      pw - The holder.
    • eatBerry

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