Class BerryItem
java.lang.Object
net.minecraft.world.item.Item
com.pixelmonmod.pixelmon.items.PixelmonItem
com.pixelmonmod.pixelmon.items.HeldItem
com.pixelmonmod.pixelmon.items.heldItems.BerryItem
- 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
- Direct Known Subclasses:
BerryCustapItem,BerryEnigmaItem,BerryGinemaItem,BerryLeppaItem,BerryMicleItem,BerryRecoilItem,BerryRestoreHPItem,BerryStatIncreaseItem,BerryStatResponseItem,BerryStatusItem,BerryTypeReducingItem,DecreaseEVBerryItem
-
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
ConstructorsConstructorDescriptionBerryItem(net.minecraft.world.item.Item.Properties properties, EnumHeldItems heldItemType, BerryType berry) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPlacePlantAtPosition(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.level.LevelReader levelReader, net.minecraft.core.BlockPos blockPos, @Nullable net.minecraft.core.Direction direction) getBerry()static @Nullable net.minecraft.world.item.DyeColorgetJuiceColor(net.minecraft.world.item.ItemStack stack) Helper method to use the itemtags directly, in case someone changes them via datapackstatic intgetJuiceTier(net.minecraft.world.item.ItemStack stack) Helper method to use the itemtags directly, in case someone changes them via datapackprotected net.minecraft.sounds.SoundEventgetPlaceSound(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player entity) voidspawnPlantAtPosition(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.level.LevelAccessor levelAccessor, net.minecraft.core.BlockPos blockPos, @Nullable net.minecraft.core.Direction direction) net.minecraft.world.InteractionResultuseOn(net.minecraft.world.item.context.UseOnContext context) Methods inherited from class com.pixelmonmod.pixelmon.items.HeldItem
adjustCritStage, affectMultiturnMove, allowsIncomingAttack, allowsIncomingAttackMessage, allowsStatChange, applyEffectAfterAllMoveEffects, 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, 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
-
Constructor Details
-
BerryItem
public BerryItem(net.minecraft.world.item.Item.Properties properties, EnumHeldItems heldItemType, BerryType berry)
-
-
Method Details
-
getTooltipText
- Overrides:
getTooltipTextin classPixelmonItem
-
useOn
public net.minecraft.world.InteractionResult useOn(net.minecraft.world.item.context.UseOnContext context) - Overrides:
useOnin classnet.minecraft.world.item.Item
-
getPlaceSound
protected net.minecraft.sounds.SoundEvent getPlaceSound(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player entity) -
canPlacePlantAtPosition
public boolean canPlacePlantAtPosition(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.level.LevelReader levelReader, net.minecraft.core.BlockPos blockPos, @Nullable @Nullable net.minecraft.core.Direction direction) - Specified by:
canPlacePlantAtPositionin interfacenet.neoforged.neoforge.common.SpecialPlantable
-
spawnPlantAtPosition
public void spawnPlantAtPosition(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.level.LevelAccessor levelAccessor, net.minecraft.core.BlockPos blockPos, @Nullable @Nullable net.minecraft.core.Direction direction) - Specified by:
spawnPlantAtPositionin interfacenet.neoforged.neoforge.common.SpecialPlantable
-
getBerry
-
getJuiceTier
public static int getJuiceTier(net.minecraft.world.item.ItemStack stack) Helper method to use the itemtags directly, in case someone changes them via datapack -
getJuiceColor
@Nullable public static @Nullable net.minecraft.world.item.DyeColor getJuiceColor(net.minecraft.world.item.ItemStack stack) Helper method to use the itemtags directly, in case someone changes them via datapack
-