Class BerryCustapItem
java.lang.Object
net.minecraft.world.item.Item
com.pixelmonmod.pixelmon.items.PixelmonItem
com.pixelmonmod.pixelmon.items.HeldItem
com.pixelmonmod.pixelmon.items.heldItems.BerryItem
com.pixelmonmod.pixelmon.items.heldItems.BerryCustapItem
- All Implemented Interfaces:
ITranslatable,net.minecraft.world.flag.FeatureElement,net.minecraft.world.level.ItemLike,net.neoforged.neoforge.common.extensions.IItemExtension,net.neoforged.neoforge.common.SpecialPlantable
Allows the user to have higher priority once when at low health.
-
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
FieldsModifier and TypeFieldDescriptionprotected booleanprotected floatFields 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
ConstructorsConstructorDescriptionBerryCustapItem(net.minecraft.world.item.Item.Properties properties) Initializes the Berry. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyStartOfTurnEffect(PixelmonWrapper pokemon) Triggers at the start of the turn, after switches and evolutions.voideatBerry(PixelmonWrapper user) Called within Berry classes after determining whether or not the Berry will be eaten.floatmodifyPriority(PixelmonWrapper pokemon, float priority, MutableBoolean fractional) Modifies the holder's attack's priority.Methods inherited from class com.pixelmonmod.pixelmon.items.heldItems.BerryItem
canPlacePlantAtPosition, getBerry, getJuiceColor, getJuiceTier, getPlaceSound, getTooltipText, spawnPlantAtPosition, useOnMethods inherited from class com.pixelmonmod.pixelmon.items.HeldItem
adjustCritStage, affectMultiturnMove, allowsIncomingAttack, allowsIncomingAttackMessage, allowsStatChange, applyEffectAfterAllMoveEffects, applyEffectAfterAllTargets, applyEffectInDaycare, applyEffectOnContact, applyPostSwitchEffect, applyRepeatedEffect, applyRepeatedEffectAfterStatus, applySwitchInEffect, applySwitchOutEffect, canEatBerry, canUseItem, dealtDamage, getHeldItemType, getItemHeld, getLocalizedName, getTranslationKey, hasNegativeEffect, ignoresKlutz, interact, isBerry, isItemOfType, modifyConfusionDamage, modifyDamageIncludeFixed, modifyEffectiveTypes, modifyMoveEffectChanceTarget, modifyMoveEffectChanceUser, modifyMoveEffects, modifyPowerAndAccuracyTarget, modifyPowerAndAccuracyUser, modifyStats, modifyWeight, onAttackUsed, onChargingUpAttack, onEndOfBattle, onGlobalStatusAdded, onGlobalStatusRemoved, onItemLost, 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, 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, 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
getTranslatedNameMethods inherited from interface net.neoforged.neoforge.common.SpecialPlantable
villagerCanPlantItem
-
Field Details
-
priorityModifier
protected float priorityModifier -
checkedThisTurn
protected boolean checkedThisTurn
-
-
Constructor Details
-
BerryCustapItem
public BerryCustapItem(net.minecraft.world.item.Item.Properties properties) Initializes the Berry.
-
-
Method Details
-
applyStartOfTurnEffect
Description copied from class:HeldItemTriggers at the start of the turn, after switches and evolutions.- Overrides:
applyStartOfTurnEffectin classHeldItem- Parameters:
pokemon- The Pokémon holding this.
-
modifyPriority
Description copied from class:HeldItemModifies the holder's attack's priority.- Overrides:
modifyPriorityin classHeldItem- 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.
-
eatBerry
Description copied from class:HeldItemCalled within Berry classes after determining whether or not the Berry will be eaten. Also called directly by certain moves (e.g., Bug Bite, Pluck).
-