Class ChoiceItem
java.lang.Object
net.minecraft.world.item.Item
com.pixelmonmod.pixelmon.items.PixelmonItem
com.pixelmonmod.pixelmon.items.HeldItem
com.pixelmonmod.pixelmon.items.heldItems.ChoiceItem
- All Implemented Interfaces:
ITranslatable,net.minecraft.world.flag.FeatureElement,net.minecraft.world.level.ItemLike,net.neoforged.neoforge.common.extensions.IItemExtension
Raises a stat by 1.5x, but locks the user into a single move while in battle.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item.TooltipContext -
Field Summary
Fields inherited from class com.pixelmonmod.pixelmon.items.PixelmonItem
bewlrFields inherited from class net.minecraft.world.item.Item
ABSOLUTE_MAX_STACK_SIZE, BASE_ATTACK_DAMAGE_ID, BASE_ATTACK_SPEED_ID, BY_BLOCK, canRepair, DEFAULT_MAX_STACK_SIZE, MAX_BAR_WIDTHFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyRepeatedEffect(PixelmonWrapper pokemon) Triggers at the end of every turn.voidTriggers when the holder switches in and when a Pokémon receives a held item in battle.voidTriggers when the holder switches out.int[]modifyStats(PixelmonWrapper user, int[] stats) Modifies the Pokémon's stats at the beginning of a battle turn.voidonAttackUsed(PixelmonWrapper user, Attack attack) Triggers when the holder uses an attack.voidTriggers when a Pokémon loses the held item in battle.Methods inherited from class com.pixelmonmod.pixelmon.items.HeldItem
adjustCritStage, affectMultiturnMove, allowsIncomingAttack, allowsIncomingAttackMessage, allowsStatChange, applyEffectAfterAllMoveEffects, applyEffectAfterAllTargets, applyEffectInDaycare, applyEffectOnContact, applyPostSwitchEffect, applyRepeatedEffectAfterStatus, applyStartOfTurnEffect, canEatBerry, canUseItem, dealtDamage, eatBerry, getHeldItemType, getItemHeld, getLocalizedName, getTranslationKey, hasNegativeEffect, ignoresKlutz, interact, isBerry, isItemOfType, modifyConfusionDamage, modifyDamageIncludeFixed, modifyEffectiveTypes, modifyMoveEffectChanceTarget, modifyMoveEffectChanceUser, modifyMoveEffects, modifyPowerAndAccuracyTarget, modifyPowerAndAccuracyUser, modifyPriority, modifyWeight, onChargingUpAttack, onEndOfBattle, onGlobalStatusAdded, onGlobalStatusRemoved, onMiss, onStartOfBattle, onStatDecrease, onStatIncrease, onStatModified, onStatusAdded, onStatusRemoved, onTerrainSwitch, onWeatherSwitch, postProcessAttackUser, postProcessDamagingAttackSubstitute, postProcessDamagingAttackTarget, postProcessDamagingAttackUser, preProcessDamagingAttackTarget, preProcessDamagingAttackUser, preventsEffectsOfWeather, tookDamageMethods inherited from class com.pixelmonmod.pixelmon.items.PixelmonItem
appendHoverText, causeTempt, getTooltipText, getTooltipText, getUseAnimation, hideFromSearches, isBookEnchantable, isDrink, isEdible, isEnchantable, isFoil, isSearchable, setDrink, setHasEffect, setTempt, useFromBag, useFromBagMethods inherited from class net.minecraft.world.item.Item
asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canFitInsideContainerItems, components, finishUsingItem, getAttackDamageBonus, getBarColor, getBarWidth, getBreakingSound, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDefaultMaxStackSize, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getId, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getTooltipImage, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isRepairable, isValidRepairItem, mineBlock, modifyDefaultComponentsFrom, onCraftedBy, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, postHurtEnemy, releaseUsing, requiredFeatures, toString, use, useOn, useOnRelease, verifyComponentsAfterLoadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods inherited from interface net.neoforged.neoforge.common.extensions.IItemExtension
applyEnchantments, canBeHurtBy, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultAttributeModifiers, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, isPrimaryItemFor, makesPiglinsNeutral, onAnimalArmorTick, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onEntitySwing, onItemUseFirst, onLeftClickEntity, onStopUsing, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, supportsEnchantmentMethods inherited from interface com.pixelmonmod.pixelmon.api.util.ITranslatable
getTranslatedName
-
Constructor Details
-
ChoiceItem
Initializes a choice item.- Parameters:
choiceItemType- The type of choice item.
-
-
Method Details
-
onAttackUsed
Description copied from class:HeldItemTriggers when the holder uses an attack.- Overrides:
onAttackUsedin classHeldItem- Parameters:
user- The attack's user.attack- The attack.
-
applySwitchInEffect
Description copied from class:HeldItemTriggers when the holder switches in and when a Pokémon receives a held item in battle.- Overrides:
applySwitchInEffectin classHeldItem- Parameters:
pw- The Pokémon switching in.
-
applySwitchOutEffect
Description copied from class:HeldItemTriggers when the holder switches out.- Overrides:
applySwitchOutEffectin classHeldItem- Parameters:
pw- The Pokémon switching out.
-
onItemLost
Description copied from class:HeldItemTriggers when a Pokémon loses the held item in battle.- Overrides:
onItemLostin classHeldItem- Parameters:
pw- The Pokémon who lost the item.
-
modifyStats
Description copied from class:HeldItemModifies the Pokémon's stats at the beginning of a battle turn.- Overrides:
modifyStatsin classHeldItem- Parameters:
user- The Pokémon.stats- The Pokémon's stats.- Returns:
- The modified stats.
-
applyRepeatedEffect
Description copied from class:HeldItemTriggers at the end of every turn.- Overrides:
applyRepeatedEffectin classHeldItem- Parameters:
pokemon- The holder.
-