Class BerryTypeReducingItem

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 BerryTypeReducingItem extends BerryItem
Reduces a super effective move of a certain type by 50%.
  • Field Details

    • typeReduced

      public Element typeReduced
      The move type that the Berry affects.
  • Constructor Details

    • BerryTypeReducingItem

      public BerryTypeReducingItem(net.minecraft.world.item.Item.Properties properties, BerryType berry, Element typeReduced)
      Initializes the Berry.
      Parameters:
      berry - The type of the berry (referenced off main berry enum)
      typeReduced - The move type that the Berry affects.
  • Method Details

    • preProcessDamagingAttackTarget

      public double preProcessDamagingAttackTarget(PixelmonWrapper attacker, PixelmonWrapper target, Attack attack, double damage)
      Description copied from class: HeldItem
      Triggers before the holder is struck by a damaging attack.
      Overrides:
      preProcessDamagingAttackTarget in class HeldItem
      Parameters:
      attacker - The attack's user.
      target - The attack's target.
      attack - The attack.
      damage - The damage to be dealt.
      Returns:
      The modified damage.
    • 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.