Package com.pixelmonmod.pixelmon.items
Class HeldItem
java.lang.Object
net.minecraft.world.item.Item
com.pixelmonmod.pixelmon.items.PixelmonItem
com.pixelmonmod.pixelmon.items.HeldItem
- All Implemented Interfaces:
ITranslatable
,net.minecraft.world.flag.FeatureElement
,net.minecraft.world.level.ItemLike
,net.minecraftforge.common.extensions.IForgeItem
- Direct Known Subclasses:
AirBalloonItem
,AmuletCoinItem
,AssaultVestItem
,BerryItem
,BerryJuiceItem
,BlackSludgeItem
,BlankTechnicalMachineItem
,BlunderPolicyItem
,BoosterEnergyItem
,BrightPowderItem
,ChoiceItem
,CovertCloakItem
,CritEnhancingItem
,DeepSeaToothScaleItem
,DestinyKnotItem
,EjectButtonItem
,EjectPackItem
,EVAdjusting
,ExpertBeltItem
,FairyFeatherItem
,FlameOrbItem
,FloatStoneItem
,FocusBandItem
,FocusSashItem
,GemsItem
,HeavyDutyBootsItem
,IncensePowerIncreaseItem
,IronBallItem
,KingsRockItem
,LaggingTailItem
,LeftoversItem
,LifeOrbItem
,MailItem
,MegaStoneItem
,MemoryItem
,MentalHerbItem
,MetalCoatItem
,MetronomeItem
,MilcerySweet
,MirrorHerbItem
,MuscleBandItem
,NoItem
,OrbItem
,OriginFormItem
,PowerHerbItem
,ProtectivePadsItem
,PunchingGloveItem
,QuickClawItem
,RaiseStatItem
,RazorClawItem
,RazorFangItem
,RedCardItem
,RingTargetItem
,RockyHelmetItem
,RoomServiceItem
,RustedShieldItem
,RustedSwordItem
,SacredAshItem
,SafetyGogglesItem
,ScopeLensItem
,ShellBellItem
,SoulDewItem
,StatEnhancingItems
,StickyBarbItem
,TerrainSeedItem
,ThroatSprayItem
,ToxicOrbItem
,TypeEnhancingItems
,WeaknessPolicyItem
,WhiteHerbItem
,WideLensItem
,ZCrystalItem
,ZoomLensItem
Item representation of a held item.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
net.minecraft.world.item.Item.Properties
-
Field Summary
Fields inherited from class com.pixelmonmod.pixelmon.items.PixelmonItem
bewlr
Fields inherited from class net.minecraft.world.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZE
Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
Constructor Summary
ConstructorDescriptionHeldItem
(EnumHeldItems heldItemType, net.minecraft.world.item.Item.Properties properties) Constructs the held item with predefined and defined attributes. -
Method Summary
Modifier and TypeMethodDescriptionint
Modifies the holder's critical hit ratio.boolean
Determines whether the held item affects multi-turn moves.boolean
allowsIncomingAttack
(PixelmonWrapper pokemon, PixelmonWrapper user, Attack a) Determines whether the holder can be hit by an incoming attack.void
allowsIncomingAttackMessage
(PixelmonWrapper pokemon, PixelmonWrapper user, Attack a) Sends a battle message when the Pokémon's Ability nullifies an attack.boolean
allowsStatChange
(PixelmonWrapper target, PixelmonWrapper user, StatsEffect statsEffect) Determines whether the holder's stats can be changed.void
applyEffectAfterAllMoveEffects
(PixelmonWrapper attacker, PixelmonWrapper defender) Triggers after all the targets of an attack have defended.void
Triggers after a Pokémon attacks all of its targets.void
applyEffectInDaycare
(Pokemon pokemon, Pokemon partner) Triggers when a Pokémon is put in a daycare with another Pokémon.void
applyEffectOnContact
(PixelmonWrapper pokemon, PixelmonWrapper opponent) Triggers when a Pokémon makes contact with the holder.void
applyPostSwitchEffect
(PixelmonWrapper newPokemon) Triggers after all the Pokémon switch in at the start of turn.void
applyRepeatedEffect
(PixelmonWrapper pokemon) Triggers at the end of every turn.void
Triggers at the end of every turn after residual status damage has been applied.void
Triggers at the start of the turn, after switches and evolutions.void
applySwitchInEffect
(PixelmonWrapper newPokemon) Triggers when the holder switches in and when a Pokémon receives a held item in battle.void
Triggers when the holder switches out.static boolean
canEatBerry
(PixelmonWrapper user) Determines whether the Pokémon can eat Berries.static boolean
canUseItem
(PixelmonWrapper user) Determines whether the Pokémon can use held items.void
dealtDamage
(PixelmonWrapper attacker, PixelmonWrapper defender, Attack attack, DamageTypeEnum damageType) Triggers when the holder deals damage.void
eatBerry
(PixelmonWrapper user) Called within Berry classes after determining whether or not the Berry will be eaten.Returns the type of held item.static HeldItem
getItemHeld
(net.minecraft.world.item.ItemStack itemStack) Gets the type of held item for an item stack.Gets the localized name of the item.boolean
Checks if the held item has a negative battle effect.boolean
Checks if the held item cannot be suppressed by the Klutz ability.boolean
interact
(PixelmonEntity pokemon, net.minecraft.world.item.ItemStack itemstack, net.minecraft.world.entity.player.Player player) Overrides the standard held item interaction (equipping the held item) if needed.boolean
isBerry()
Determines whether the held item is a Berry.static boolean
isItemOfType
(net.minecraft.world.item.ItemStack itemStack, EnumHeldItems type) Returns whether an item is a certain held item.int
modifyConfusionDamage
(int damage, PixelmonWrapper pw) Triggers when the Pokémon takes would take Confusion damage.double
modifyDamageIncludeFixed
(double damage, PixelmonWrapper attacker, PixelmonWrapper target, Attack attack) Modifies damage done on the holder by damaging attacks, including fixed damage.modifyEffectiveTypes
(PixelmonWrapper user, PixelmonWrapper target, List<Element> types) Returns the types that will be used in calculating the Pokémon's attack's type effectiveness.void
modifyMoveEffectChanceTarget
(PixelmonWrapper user, PixelmonWrapper target, List<EffectBase> effects) Allows the target's held item to adjust the move's effects, such as disabling effects from CovertCloakvoid
modifyMoveEffectChanceUser
(PixelmonWrapper user, PixelmonWrapper target, List<EffectBase> effects) Allows the user's held item to adjust the move's effects, such as adding Flinch from King's Rockvoid
modifyMoveEffects
(PixelmonWrapper user, PixelmonWrapper target, List<EffectBase> effects) Allows the user's held item to adjust the move's effects, such as adding Flinch from King's Rockint[]
modifyPowerAndAccuracyTarget
(int[] modifiedMoveStats, PixelmonWrapper user, PixelmonWrapper target, Attack a) Modifies the power and accuracy of the attack about to hit the Pokémon.int[]
modifyPowerAndAccuracyUser
(int[] modifiedMoveStats, PixelmonWrapper user, PixelmonWrapper target, Attack a) Modifies the power and accuracy of the Pokémon's attack.float
modifyPriority
(PixelmonWrapper pokemon, float priority, MutableBoolean fractional) Modifies the holder's attack's priority.int[]
modifyStats
(PixelmonWrapper user, int[] stats) Modifies the Pokémon's stats at the beginning of a battle turn.float
modifyWeight
(float initWeight) Modifies the Pokémon's weight.void
onAttackUsed
(PixelmonWrapper user, Attack attack) Triggers when the holder uses an attack.void
Triggers at the end of the battle.void
onGlobalStatusAdded
(PixelmonWrapper itemHolder, GlobalStatusBase globalStatus) Triggers when a global status is added to the battle.void
onMiss
(PixelmonWrapper attacker, PixelmonWrapper target, Attack attack) Triggers if the holder misses an attack.void
Triggers at the start of the battle (wherever this is).void
onStatDecrease
(PixelmonWrapper pokemon, PixelmonWrapper cause, PixelmonWrapper affected, int amount, BattleStatsType stat) Triggers when a Pokémon's stat is decreased.void
onStatIncrease
(PixelmonWrapper pokemon, PixelmonWrapper affected, int amount, BattleStatsType stat) Triggers when a Pokémon's stat is increased.void
onStatModified
(PixelmonWrapper itemHolder, PixelmonWrapper affected) Triggers when a Pokémon's stats are modified.void
onStatusAdded
(PixelmonWrapper user, PixelmonWrapper opponent, StatusBase status) Triggers when the holder is statused.void
onTerrainSwitch
(BattleController bc, PixelmonWrapper user, Terrain terrain) Triggers when the terrain is changed in battle.void
onWeatherSwitch
(BattleController bc, PixelmonWrapper user, Weather weather) Triggers when the weather is changed in battle.void
postProcessAttackUser
(PixelmonWrapper attacker, PixelmonWrapper target, Attack attack) Triggers after the holder uses an attack.void
postProcessDamagingAttackTarget
(PixelmonWrapper attacker, PixelmonWrapper target, Attack attack, float damage, DamageTypeEnum damageType) Triggers after the holder is hit by a damaging attack.void
postProcessDamagingAttackUser
(PixelmonWrapper attacker, PixelmonWrapper target, Attack attack, float damage) Triggers after the holder uses a damaging attack.double
preProcessDamagingAttackTarget
(PixelmonWrapper attacker, PixelmonWrapper target, Attack attack, double damage) Triggers before the holder is struck by a damaging attack.double
preProcessDamagingAttackUser
(PixelmonWrapper attacker, PixelmonWrapper target, Attack attack, double damage) Triggers before the holder uses a damaging attack.void
tookDamage
(PixelmonWrapper attacker, PixelmonWrapper defender, float damage, DamageTypeEnum damageType) Triggers when the holder takes damage.Methods inherited from class com.pixelmonmod.pixelmon.items.PixelmonItem
appendHoverText, causeTempt, getTooltipText, getTooltipText, getUseAnimation, hideFromSearches, initializeClient, isBookEnchantable, isDrink, isEdible, isEnchantable, isFoil, isSearchable, setDrink, setHasEffect, setTempt, useFromBag, useFromBag
Methods inherited from class net.minecraft.world.item.Item
asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseDuration, hasCraftingRemainingItem, hurtEnemy, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isFireResistant, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, use, useOn, useOnRelease, verifyTagAfterLoad
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
Methods inherited from interface net.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getShareTag, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, initCapabilities, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onInventoryTick, onItemUseFirst, onLeftClickEntity, onStopUsing, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
Methods inherited from interface com.pixelmonmod.pixelmon.api.util.ITranslatable
getTranslatedName
-
Constructor Details
-
HeldItem
Constructs the held item with predefined and defined attributes.- Parameters:
heldItemType
- Type of held item.
-
-
Method Details
-
getHeldItemType
Returns the type of held item.- Returns:
- The type of held item.
-
isItemOfType
public static boolean isItemOfType(net.minecraft.world.item.ItemStack itemStack, EnumHeldItems type) Returns whether an item is a certain held item.- Parameters:
itemStack
- The item to check.type
- The desired held item type.- Returns:
- Whether the item is of the desired held item type.
-
interact
public boolean interact(PixelmonEntity pokemon, net.minecraft.world.item.ItemStack itemstack, net.minecraft.world.entity.player.Player player) Overrides the standard held item interaction (equipping the held item) if needed.- Parameters:
pokemon
- The Pokémon being given the item.itemstack
- The itemstack used to interact.player
- The player using the item.- Returns:
- Whether the item was used.
-
applyStartOfTurnEffect
Triggers at the start of the turn, after switches and evolutions.- Parameters:
pw
- The Pokémon holding this.
-
onStartOfBattle
Triggers at the start of the battle (wherever this is).- Parameters:
pw
- The Pokémon holding this.
-
onEndOfBattle
Triggers at the end of the battle.- Parameters:
pw
- The Pokémon in battle at the battle's end.
-
dealtDamage
public void dealtDamage(PixelmonWrapper attacker, PixelmonWrapper defender, Attack attack, DamageTypeEnum damageType) Triggers when the holder deals damage.- Parameters:
attacker
- The source of the damage.defender
- The target of the damage.attack
- The attack used by the attacker.damageType
- The type of damage that was dealt.
-
tookDamage
public void tookDamage(PixelmonWrapper attacker, PixelmonWrapper defender, float damage, DamageTypeEnum damageType) Triggers when the holder takes damage.- 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.
-
onAttackUsed
Triggers when the holder uses an attack.- Parameters:
user
- The attack's user.attack
- The attack.
-
preProcessDamagingAttackUser
public double preProcessDamagingAttackUser(PixelmonWrapper attacker, PixelmonWrapper target, Attack attack, double damage) Triggers before the holder uses a damaging attack.- Parameters:
attacker
- The attack's user.target
- The attack's target.attack
- The attack.damage
- The damage to be dealt.- Returns:
- The modified damage.
-
preProcessDamagingAttackTarget
public double preProcessDamagingAttackTarget(PixelmonWrapper attacker, PixelmonWrapper target, Attack attack, double damage) Triggers before the holder is struck by a damaging attack.- Parameters:
attacker
- The attack's user.target
- The attack's target.attack
- The attack.damage
- The damage to be dealt.- Returns:
- The modified damage.
-
postProcessAttackUser
Triggers after the holder uses an attack.- Parameters:
attacker
- The attack's user.target
- The attack's target.attack
- The attack.
-
postProcessDamagingAttackUser
public void postProcessDamagingAttackUser(PixelmonWrapper attacker, PixelmonWrapper target, Attack attack, float damage) Triggers after the holder uses a damaging attack.- Parameters:
attacker
- The attack's user.target
- The attack's target.attack
- The attack.damage
- The damage dealt.
-
postProcessDamagingAttackTarget
public void postProcessDamagingAttackTarget(PixelmonWrapper attacker, PixelmonWrapper target, Attack attack, float damage, DamageTypeEnum damageType) Triggers after the holder is hit by a damaging attack.- Parameters:
attacker
- The attack's user.target
- The attack's target.attack
- The attack.damage
- The damage dealt.damageType
- The type of damage dealt.
-
modifyDamageIncludeFixed
public double modifyDamageIncludeFixed(double damage, PixelmonWrapper attacker, PixelmonWrapper target, Attack attack) Modifies damage done on the holder by damaging attacks, including fixed damage.- Parameters:
damage
- The damage dealt.attacker
- The attack's user.target
- The attack's target.attack
- The attack.- Returns:
- The modified damage.
-
modifyConfusionDamage
Triggers when the Pokémon takes would take Confusion damage.- Parameters:
damage
- The amount of damage dealt.pw
- The Pokémon taking damage.- Returns:
- The modified damage.
-
applyEffectAfterAllTargets
Triggers after a Pokémon attacks all of its targets.- Parameters:
user
- The move's user.
-
applyEffectAfterAllMoveEffects
Triggers after all the targets of an attack have defended.- Parameters:
attacker
- The move's user.defender
- The Pokémon defending from the attacker.
-
onMiss
Triggers if the holder misses an attack.- Parameters:
attacker
- The attack's user.target
- The attack's intended target.attack
- The attack used.
-
allowsIncomingAttack
Determines whether the holder can be hit by an incoming attack.- Parameters:
pokemon
- The holder.user
- The attack's user.a
- The attack.- Returns:
- Whether the attack can hit the holder.
-
allowsIncomingAttackMessage
Sends a battle message when the Pokémon's Ability nullifies an attack.- Parameters:
pokemon
- The Pokémon with the Ability.user
- The attack's user.a
- The attack.
-
allowsStatChange
public boolean allowsStatChange(PixelmonWrapper target, PixelmonWrapper user, StatsEffect statsEffect) Determines whether the holder's stats can be changed.- Parameters:
target
- The holder.user
- The attack's user.statsEffect
- The stat change.- Returns:
- Whether the attack can hit the holder.
-
applySwitchInEffect
Triggers when the holder switches in and when a Pokémon receives a held item in battle.- Parameters:
newPokemon
- The Pokémon switching in.
-
applyPostSwitchEffect
Triggers after all the Pokémon switch in at the start of turn.- Parameters:
newPokemon
- The Pokémon switching in.
-
applySwitchOutEffect
Triggers when the holder switches out.- Parameters:
pw
- The Pokémon switching out.
-
onStatusAdded
Triggers when the holder is statused.- Parameters:
user
- The statused Pokémon.opponent
- The Pokémon that caused the status.status
- The new status.
-
onGlobalStatusAdded
Triggers when a global status is added to the battle.- Parameters:
itemHolder
- The Pokémon holding the item.globalStatus
- The new status.
-
onStatIncrease
public void onStatIncrease(PixelmonWrapper pokemon, PixelmonWrapper affected, int amount, BattleStatsType stat) Triggers when a Pokémon's stat is increased.- Parameters:
pokemon
- The Pokémon whose item it is.affected
- The Pokémon whose stat was increased.amount
- The size of the increase.stat
- The stat that was increased.
-
onStatDecrease
public void onStatDecrease(PixelmonWrapper pokemon, PixelmonWrapper cause, PixelmonWrapper affected, int amount, BattleStatsType stat) Triggers when a Pokémon's stat is decreased.- Parameters:
pokemon
- The Pokémon whose item it is.cause
- The Pokémon that caused stat decrease.affected
- The Pokémon whose stat was decreased.amount
- The size of the decrease.stat
- The stat that was decreased.
-
onStatModified
Triggers when a Pokémon's stats are modified.- Parameters:
itemHolder
- The Pokémon holding the item.affected
- The Pokémon whose stats were just modified.
-
onTerrainSwitch
Triggers when the terrain is changed in battle.- Parameters:
bc
- The battle controller.user
- The Pokémon whose holding this item.terrain
- The terrain being switched in.
-
onWeatherSwitch
Triggers when the weather is changed in battle.- Parameters:
bc
- The battle controller.user
- The Pokémon whose holding this item.weather
- The weather being switched in.
-
adjustCritStage
Modifies the holder's critical hit ratio.- Parameters:
user
- The holder.
-
applyRepeatedEffect
Triggers at the end of every turn.- Parameters:
pokemon
- The holder.
-
applyRepeatedEffectAfterStatus
Triggers at the end of every turn after residual status damage has been applied.- Parameters:
pokemon
- The holder.
-
applyEffectOnContact
Triggers when a Pokémon makes contact with the holder.- Parameters:
pokemon
- The attack's user.opponent
- The attack's target.
-
applyEffectInDaycare
Triggers when a Pokémon is put in a daycare with another Pokémon.- Parameters:
pokemon
- The holder.partner
- The holder's partner in the daycare.
-
modifyEffectiveTypes
public List<Element> modifyEffectiveTypes(PixelmonWrapper user, PixelmonWrapper target, List<Element> types) Returns the types that will be used in calculating the Pokémon's attack's type effectiveness.- Parameters:
user
- The attack's user.target
- The attack's target.types
- The existing target's types.- Returns:
- The target's modified types.
-
eatBerry
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).- Parameters:
user
- The Pokémon consuming the Berry.
-
canEatBerry
Determines whether the Pokémon can eat Berries.- Parameters:
user
- The holder.- Returns:
- Whether the Pokémon can eat Berries.
-
modifyPowerAndAccuracyUser
public int[] modifyPowerAndAccuracyUser(int[] modifiedMoveStats, PixelmonWrapper user, PixelmonWrapper target, Attack a) Modifies the power and accuracy of the Pokémon's attack.- Parameters:
modifiedMoveStats
- The attack's power and accuracy.user
- The attack's user.target
- The attack's target.a
- The attack.- Returns:
- The modified power and accuracy.
-
modifyPowerAndAccuracyTarget
public int[] modifyPowerAndAccuracyTarget(int[] modifiedMoveStats, PixelmonWrapper user, PixelmonWrapper target, Attack a) Modifies the power and accuracy of the attack about to hit the Pokémon.- Parameters:
modifiedMoveStats
- The attack's power and accuracy.user
- The attack's user.target
- The attack's target.a
- The attack.- Returns:
- The modified power and accuracy.
-
modifyStats
Modifies the Pokémon's stats at the beginning of a battle turn.- Parameters:
user
- The Pokémon.stats
- The Pokémon's stats.- Returns:
- The modified stats.
-
modifyPriority
Modifies the holder's attack's priority.- Parameters:
pokemon
- The attack's user.priority
- The attack's priority.fractional
- Whether an ability before this also modified priority with a fractional change.- Returns:
- The modified priority.
-
affectMultiturnMove
Determines whether the held item affects multi-turn moves.- Parameters:
user
- The holder.- Returns:
- Whether the held item affects multi-turn moves.
-
modifyMoveEffects
public void modifyMoveEffects(PixelmonWrapper user, PixelmonWrapper target, List<EffectBase> effects) Allows the user's held item to adjust the move's effects, such as adding Flinch from King's Rock- Parameters:
user
- The item holder and attacking Pokemon.target
- The Pokemon being attacked.effects
- The current effects of the attack.
-
modifyMoveEffectChanceUser
public void modifyMoveEffectChanceUser(PixelmonWrapper user, PixelmonWrapper target, List<EffectBase> effects) Allows the user's held item to adjust the move's effects, such as adding Flinch from King's Rock- Parameters:
user
- The item holder and attacking Pokemon.target
- The Pokemon being attacked.effects
- The current effects of the attack.
-
modifyMoveEffectChanceTarget
public void modifyMoveEffectChanceTarget(PixelmonWrapper user, PixelmonWrapper target, List<EffectBase> effects) Allows the target's held item to adjust the move's effects, such as disabling effects from CovertCloak- Parameters:
user
- The item holder and attacking Pokemon.target
- The Pokemon being attacked.effects
- The current effects of the attack.
-
modifyWeight
public float modifyWeight(float initWeight) Modifies the Pokémon's weight.- Parameters:
initWeight
- The Pokémon's weight.- Returns:
- The modified weight.
-
hasNegativeEffect
public boolean hasNegativeEffect()Checks if the held item has a negative battle effect.- Returns:
- Whether the held item has a negative battle effect.
-
ignoresKlutz
public boolean ignoresKlutz()Checks if the held item cannot be suppressed by the Klutz ability.- Returns:
- Whether the held item can be used by a pokemon with the Klutz ability.
-
isBerry
public boolean isBerry()Determines whether the held item is a Berry.- Returns:
- Whether the held item is a Berry.
-
canUseItem
Determines whether the Pokémon can use held items.- Parameters:
user
- The Pokémon.- Returns:
- Whether the Pokémon can use held items.
-
getItemHeld
Gets the type of held item for an item stack.- Parameters:
itemStack
- The item stack to get a held item for.- Returns:
- The type of the item for the specified item stack.
-
getTranslationKey
- Specified by:
getTranslationKey
in interfaceITranslatable
-
getLocalizedName
Description copied from class:PixelmonItem
Gets the localized name of the item.- Specified by:
getLocalizedName
in interfaceITranslatable
- Overrides:
getLocalizedName
in classPixelmonItem
- Returns:
- The localized name of the item.
-