Class BerryStatResponseItem

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 BerryStatResponseItem extends BerryItem
A Berry that raises a stat when hit by a certain move category.
  • Constructor Details

    • BerryStatResponseItem

      public BerryStatResponseItem(net.minecraft.world.item.Item.Properties properties, EnumHeldItems type, BerryType berry, AttackCategory category, BattleStatsType stat)
      Initializes a Berry.
      Parameters:
      type - The Berry's type.
      berry - The type of the berry (referenced off main berry enum)
      category - The move category that triggers the Berry.
      stat - The stat raised 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.
    • 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.