Class StatEnhancingItems

java.lang.Object
net.minecraft.world.item.Item
com.pixelmonmod.pixelmon.items.PixelmonItem
com.pixelmonmod.pixelmon.items.HeldItem
com.pixelmonmod.pixelmon.items.heldItems.StatEnhancingItems
All Implemented Interfaces:
ITranslatable, net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.ItemLike, net.minecraftforge.common.extensions.IForgeItem
Direct Known Subclasses:
DittoEnhancingItem, EvioliteItem

public class StatEnhancingItems extends HeldItem
Items that increase the stats of specific Pokémon.
  • Constructor Details

    • StatEnhancingItems

      @SafeVarargs public StatEnhancingItems(EnumHeldItems type, BattleStatsType[] raisedStats, float statMultiplier, Supplier<Species>... affected)
      Initializes a stat enhancing item.
      Parameters:
      type - The type of stat enhancing item.
      raisedStats - The stats raised by the item.
      statMultiplier - The muliplier of the stat raise.
      affected - The Pokémon affected by the item.
  • Method Details

    • modifyStats

      public int[] modifyStats(PixelmonWrapper user, int[] stats)
      Description copied from class: HeldItem
      Modifies the Pokémon's stats at the beginning of a battle turn.
      Overrides:
      modifyStats in class HeldItem
      Parameters:
      user - The Pokémon.
      stats - The Pokémon's stats.
      Returns:
      The modified stats.
    • canAffect

      protected boolean canAffect(PixelmonWrapper pokemon)
      Checks if the item affects the Pokémon.
      Parameters:
      pokemon - The Pokémon to check for the item affecting.
      Returns:
      Whether the item affects the Pokémon.