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

    • postProcessDamagingAttackTarget

      public void postProcessDamagingAttackTarget(PixelmonWrapper attacker, PixelmonWrapper target, Attack attack, float damage, DamageTypeEnum damageType)
      Description copied from class: HeldItem
      Triggers after the holder is hit by a damaging attack.
      Overrides:
      postProcessDamagingAttackTarget in class HeldItem
      Parameters:
      attacker - The attack's user.
      target - The attack's target.
      attack - The attack.
      damage - The damage dealt.
      damageType - The type of damage 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.