Class EjectButtonItem
java.lang.Object
net.minecraft.world.item.Item
com.pixelmonmod.pixelmon.items.PixelmonItem
com.pixelmonmod.pixelmon.items.HeldItem
com.pixelmonmod.pixelmon.items.heldItems.EjectButtonItem
- All Implemented Interfaces:
- ITranslatable,- net.minecraft.world.flag.FeatureElement,- net.minecraft.world.level.ItemLike,- net.neoforged.neoforge.common.extensions.IItemExtension
Switches out the holder when attacked.
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraft.world.item.Itemnet.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item.TooltipContext
- 
Field SummaryFields inherited from class com.pixelmonmod.pixelmon.items.PixelmonItembewlrFields inherited from class net.minecraft.world.item.ItemABSOLUTE_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.FeatureElementFILTERED_REGISTRIES
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidapplyEffectAfterAllMoveEffects(PixelmonWrapper attacker, PixelmonWrapper target) Triggers after all the targets of an attack have defended.voidcheckIfCanSwitchAndThenSwitch(PixelmonWrapper itemHolder) voidpostProcessDamagingAttackTarget(PixelmonWrapper attacker, PixelmonWrapper target, Attack attack, float damage, DamageTypeEnum damageType) Triggers after the holder is hit by a damaging attack.Methods inherited from class com.pixelmonmod.pixelmon.items.HeldItemadjustCritStage, affectMultiturnMove, allowsIncomingAttack, allowsIncomingAttackMessage, allowsStatChange, applyEffectAfterAllTargets, applyEffectInDaycare, applyEffectOnContact, applyPostSwitchEffect, applyRepeatedEffect, applyRepeatedEffectAfterStatus, applyStartOfTurnEffect, applySwitchInEffect, applySwitchOutEffect, canEatBerry, canUseItem, dealtDamage, eatBerry, getHeldItemType, getItemHeld, getLocalizedName, getTranslationKey, hasNegativeEffect, ignoresKlutz, interact, isBerry, isItemOfType, modifyConfusionDamage, modifyDamageIncludeFixed, modifyEffectiveTypes, modifyMoveEffectChanceTarget, modifyMoveEffectChanceUser, modifyMoveEffects, modifyPowerAndAccuracyTarget, modifyPowerAndAccuracyUser, modifyPriority, modifyStats, modifyWeight, onAttackUsed, onChargingUpAttack, onEndOfBattle, onGlobalStatusAdded, onGlobalStatusRemoved, onItemLost, onMiss, onStartOfBattle, onStatDecrease, onStatIncrease, onStatModified, onStatusAdded, onStatusRemoved, onTerrainSwitch, onWeatherSwitch, postProcessAttackUser, postProcessDamagingAttackSubstitute, postProcessDamagingAttackUser, preProcessDamagingAttackTarget, preProcessDamagingAttackUser, preventsEffectsOfWeather, tookDamageMethods inherited from class com.pixelmonmod.pixelmon.items.PixelmonItemappendHoverText, causeTempt, getTooltipText, getTooltipText, getUseAnimation, hideFromSearches, isBookEnchantable, isDrink, isEdible, isEnchantable, isFoil, isSearchable, setDrink, setHasEffect, setTempt, useFromBag, useFromBagMethods inherited from class net.minecraft.world.item.ItemasItem, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.flag.FeatureElementisEnabledMethods inherited from interface net.neoforged.neoforge.common.extensions.IItemExtensionapplyEnchantments, 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.ITranslatablegetTranslatedName
- 
Constructor Details- 
EjectButtonItempublic EjectButtonItem()Initializes the held item.
 
- 
- 
Method Details- 
postProcessDamagingAttackTargetpublic void postProcessDamagingAttackTarget(PixelmonWrapper attacker, PixelmonWrapper target, Attack attack, float damage, DamageTypeEnum damageType) Description copied from class:HeldItemTriggers after the holder is hit by a damaging attack.- Overrides:
- postProcessDamagingAttackTargetin class- HeldItem
- Parameters:
- attacker- The attack's user.
- target- The attack's target.
- attack- The attack.
- damage- The damage dealt.
- damageType- The type of damage dealt.
 
- 
applyEffectAfterAllMoveEffectsDescription copied from class:HeldItemTriggers after all the targets of an attack have defended.- Overrides:
- applyEffectAfterAllMoveEffectsin class- HeldItem
- Parameters:
- attacker- The move's user.
- target- The Pokémon defending from the attacker.
 
- 
checkIfCanSwitchAndThenSwitch
 
-