public class BerryStatusItem extends BerryItem
| Constructor and Description |
|---|
BerryStatusItem(net.minecraft.item.Item.Properties properties,
BerryType berry,
StatusType... statusHealed)
Initializes a Berry.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyRepeatedEffect(PixelmonWrapper pw)
Triggers at the end of every turn.
|
void |
applySwitchInEffect(PixelmonWrapper newPokemon)
Triggers when the holder switches in and when a Pokémon receives a held item in battle.
|
boolean |
canHealStatus(StatusType status)
Checks if the Berry can heal a certain status.
|
void |
eatBerry(PixelmonWrapper pokemon)
Called within Berry classes after determining whether or not the Berry will be eaten.
|
boolean |
healStatus(PixelmonWrapper pokemon)
Heals the corresponding statuses as defined by the Berry.
|
boolean |
interact(PixelmonEntity pokemon,
net.minecraft.item.ItemStack itemstack,
net.minecraft.entity.player.PlayerEntity player)
Overrides the standard held item interaction (equipping the held item) if needed.
|
void |
onStatusAdded(PixelmonWrapper user,
PixelmonWrapper opponent,
StatusBase status)
Triggers when the holder is statused.
|
boolean |
useFromBag(PixelmonWrapper userWrapper,
PixelmonWrapper targetWrapper,
net.minecraft.item.ItemStack stack)
Uses the item in battle.
|
getBerry, getPlaceSound, getPlant, getPlantType, getTooltipText, useOnadjustCritStage, affectMultiturnMove, allowsIncomingAttack, allowsIncomingAttackMessage, applyEffectAfterAllTargets, applyEffectInDaycare, applyEffectOnContact, applyPostSwitchEffect, applyRepeatedEffectAfterStatus, applySwitchOutEffect, canEatBerry, canUseItem, dealtDamage, getEffectiveTypes, getHeldItemType, getItemHeld, hasNegativeEffect, isBerry, isItemOfType, modifyDamageIncludeFixed, modifyPowerAndAccuracyTarget, modifyPowerAndAccuracyUser, modifyPriority, modifyStats, modifyWeight, onAttackUsed, onEndOfBattle, onGlobalStatusAdded, onMiss, onStartOfBattle, onStatDecrease, onStatIncrease, onStatModified, onTerrainSwitch, onWeatherSwitch, postProcessAttackUser, postProcessDamagingAttackTarget, postProcessDamagingAttackUser, preProcessDamagingAttackTarget, preProcessDamagingAttackUser, tookDamageappendHoverText, causeTempt, fillItemCategory, getLocalizedName, getTooltipText, getUseAnimation, hideFromSearches, isBookEnchantable, isDrink, isEdible, isEnchantable, isFoil, isSearchable, setDrink, setHasEffect, setTempt, useFromBagallowdedIn, asItem, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, finishUsingItem, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getFoodProperties, getHarvestLevel, getId, getItemCategory, getItemStackTileEntityRenderer, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getTags, getToolTypes, getUseDuration, hasCraftingRemainingItem, hurtEnemy, interactLivingEntity, inventoryTick, is, isComplex, isCorrectToolForDrops, isFireResistant, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onUseTick, releaseUsing, shouldOverrideMultiplayerNbt, toString, use, useOnRelease, verifyTagAfterLoadgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcanApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canHarvestBlock, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getArmorModel, getArmorTexture, getAttributeModifiers, getBurnTime, getBurnTime, getContainerItem, getCreativeTabs, getCreatorModId, getDamage, getDurabilityForDisplay, getEntityLifespan, getEquipmentSlot, getFontRenderer, getHighlightTip, getItem, getItemEnchantability, getItemStackLimit, getMaxDamage, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getXpRepairRatio, hasContainerItem, hasCustomEntity, initCapabilities, isDamageable, isDamaged, isEnderMask, isPiglinCurrency, isShield, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onUsingTick, readShareTag, renderHelmetOverlay, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, showDurabilityBarpublic BerryStatusItem(net.minecraft.item.Item.Properties properties,
BerryType berry,
StatusType... statusHealed)
berry - The type of the Berry (referenced off main Berry enum).statusHealed - The statuses healed by the Berry.public boolean interact(PixelmonEntity pokemon, net.minecraft.item.ItemStack itemstack, net.minecraft.entity.player.PlayerEntity player)
HeldItempublic void onStatusAdded(PixelmonWrapper user, PixelmonWrapper opponent, StatusBase status)
HeldItemonStatusAdded in class HeldItemuser - The statused Pokémon.opponent - The Pokémon that caused the status.status - The new status.public void applySwitchInEffect(PixelmonWrapper newPokemon)
HeldItemapplySwitchInEffect in class HeldItemnewPokemon - The Pokémon switching in.public void applyRepeatedEffect(PixelmonWrapper pw)
HeldItemapplyRepeatedEffect in class HeldItempw - The holder.public void eatBerry(PixelmonWrapper pokemon)
HeldItempublic boolean useFromBag(PixelmonWrapper userWrapper, PixelmonWrapper targetWrapper, net.minecraft.item.ItemStack stack)
PixelmonItemuseFromBag in class PixelmonItemuserWrapper - The Pokémon whose turn is being spent using the item.targetWrapper - The Pokémon the item is being used on.stack - The item stack used.public boolean healStatus(PixelmonWrapper pokemon)
pokemon - The Pokémon being healed.public boolean canHealStatus(StatusType status)
status - The status to check for.