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.TooltipContext
Nested classes/interfaces inherited from interface net.minecraft.world.item.ProjectileItem
ProjectileItem.DispenseConfig, ProjectileItem.PositionFunction
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final float
static final float
static final int
Fields 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_WIDTH
Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasProjectile
(Level pLevel, Position pPos, ItemStack pStack, Direction pDirection) boolean
canAttackBlock
(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer) boolean
canPerformAction
(ItemStack stack, ItemAbility itemAbility) Queries if an item can perform the given action.static ItemAttributeModifiers
static Tool
int
getUseAnimation
(ItemStack pStack) Returns the action that specifies what animation to play when the item is being used.int
getUseDuration
(ItemStack pStack, LivingEntity pEntity) boolean
hurtEnemy
(ItemStack pStack, LivingEntity pTarget, LivingEntity pAttacker) Current implementations of this method in child classes do not use the entry argument beside ev.private static boolean
isTooDamagedToUse
(ItemStack pStack) void
postHurtEnemy
(ItemStack pStack, LivingEntity pTarget, LivingEntity pAttacker) void
releaseUsing
(ItemStack pStack, Level pLevel, LivingEntity pEntityLiving, int pTimeLeft) Called when the player stops using an Item (stops holding the right mouse button).use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.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, getTooltipImage, hasCraftingRemainingItem, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEnchantable, isFoil, isRepairable, isValidRepairItem, mineBlock, modifyDefaultComponentsFrom, onCraftedBy, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, requiredFeatures, toString, useOn, useOnRelease, verifyComponentsAfterLoad
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
Methods inherited from interface net.neoforged.neoforge.common.extensions.IItemExtension
applyEnchantments, canBeHurtBy, 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, onEntitySwing, onItemUseFirst, onLeftClickEntity, onStopUsing, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, supportsEnchantment
Methods 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
- Overrides:
canAttackBlock
in classItem
-
getUseAnimation
Returns the action that specifies what animation to play when the item is being used.- Overrides:
getUseAnimation
in classItem
-
getUseDuration
- Overrides:
getUseDuration
in classItem
-
releaseUsing
Called when the player stops using an Item (stops holding the right mouse button).- Overrides:
releaseUsing
in classItem
-
use
Called to trigger the item's "innate" right click behavior. To handle when this item is used on a Block, seeinvalid reference
#onItemUse
-
isTooDamagedToUse
-
hurtEnemy
Current implementations of this method in child classes do not use the entry argument beside ev. They just raise the damage on the stack. -
postHurtEnemy
- Overrides:
postHurtEnemy
in classItem
-
getEnchantmentValue
public int getEnchantmentValue()- Overrides:
getEnchantmentValue
in classItem
-
asProjectile
- Specified by:
asProjectile
in interfaceProjectileItem
-
canPerformAction
Description copied from interface:IItemExtension
Queries if an item can perform the given action. SeeItemAbilities
for a description of each stock action- Specified by:
canPerformAction
in interfaceIItemExtension
- Parameters:
stack
- The stack being useditemAbility
- The action being queried- Returns:
- True if the stack can perform the action
-