Package net.minecraft.world.item
Class TridentItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.TridentItem
- All Implemented Interfaces:
FeatureElement,ProjectileItem,ItemLike,IItemExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
Item.Properties, Item.TooltipContextNested classes/interfaces inherited from interface net.minecraft.world.item.ProjectileItem
ProjectileItem.DispenseConfig, ProjectileItem.PositionFunction -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatstatic final floatstatic final intFields 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 TypeMethodDescriptionasProjectile(Level p_338505_, Position p_338277_, ItemStack p_338353_, Direction p_338220_) booleancanAttackBlock(BlockState p_43409_, Level p_43410_, BlockPos p_43411_, Player p_43412_) booleancanPerformAction(ItemStack stack, ToolAction toolAction) Queries if an item can perform the given action.static ItemAttributeModifiersstatic ToolintgetUseAnimation(ItemStack p_43417_) intgetUseDuration(ItemStack p_43419_, LivingEntity p_345001_) booleanhurtEnemy(ItemStack p_43390_, LivingEntity p_43391_, LivingEntity p_43392_) private static booleanisTooDamagedToUse(ItemStack p_353073_) voidpostHurtEnemy(ItemStack p_345950_, LivingEntity p_345617_, LivingEntity p_345537_) voidreleaseUsing(ItemStack p_43394_, Level p_43395_, LivingEntity p_43396_, int p_43397_) use(Level p_43405_, Player p_43406_, InteractionHand p_43407_) Methods inherited from class net.minecraft.world.item.Item
appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canFitInsideContainerItems, components, finishUsingItem, getAttackDamageBonus, getBarColor, getBarWidth, getBreakingSound, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDefaultMaxStackSize, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getId, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRenderPropertiesInternal, getTooltipImage, hasCraftingRemainingItem, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEnchantable, isFoil, isRepairable, isValidRepairItem, mineBlock, modifyDefaultComponentsFrom, onCraftedBy, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, requiredFeatures, toString, 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
canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultAttributeModifiers, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, isBookEnchantable, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, isPrimaryItemFor, makesPiglinsNeutral, onAnimalArmorTick, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemUseFirst, onLeftClickEntity, onStopUsing, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimationMethods inherited from interface net.minecraft.world.item.ProjectileItem
createDispenseConfig, shoot
-
Field Details
-
THROW_THRESHOLD_TIME
public static final int THROW_THRESHOLD_TIME- See Also:
-
BASE_DAMAGE
public static final float BASE_DAMAGE- See Also:
-
SHOOT_POWER
public static final float SHOOT_POWER- See Also:
-
-
Constructor Details
-
TridentItem
-
-
Method Details
-
createAttributes
-
createToolProperties
-
canAttackBlock
public boolean canAttackBlock(BlockState p_43409_, Level p_43410_, BlockPos p_43411_, Player p_43412_) - Overrides:
canAttackBlockin classItem
-
getUseAnimation
- Overrides:
getUseAnimationin classItem
-
getUseDuration
- Overrides:
getUseDurationin classItem
-
releaseUsing
- Overrides:
releaseUsingin classItem
-
use
public InteractionResultHolder<ItemStack> use(Level p_43405_, Player p_43406_, InteractionHand p_43407_) -
isTooDamagedToUse
-
hurtEnemy
-
postHurtEnemy
- Overrides:
postHurtEnemyin classItem
-
getEnchantmentValue
public int getEnchantmentValue()- Overrides:
getEnchantmentValuein classItem
-
asProjectile
public Projectile asProjectile(Level p_338505_, Position p_338277_, ItemStack p_338353_, Direction p_338220_) - Specified by:
asProjectilein interfaceProjectileItem
-
canPerformAction
Description copied from interface:IItemExtensionQueries if an item can perform the given action. SeeToolActionsfor a description of each stock action- Specified by:
canPerformActionin interfaceIItemExtension- Parameters:
stack- The stack being usedtoolAction- The action being queried- Returns:
- True if the stack can perform the action
-