Class BerryEnigmaItem

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 BerryEnigmaItem extends BerryItem
Heals the holder by 25% hp if hit by a super effective move.
  • Constructor Details

    • BerryEnigmaItem

      public BerryEnigmaItem(net.minecraft.world.item.Item.Properties properties)
      Initializes 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 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.