Package net.minecraft.world.item
Class ShieldItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.ShieldItem
- All Implemented Interfaces:
FeatureElement,Equipable,ItemLike,IItemExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
Item.Properties, Item.TooltipContext -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final floatFields 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 TypeMethodDescriptionvoidappendHoverText(ItemStack p_43094_, Item.TooltipContext p_339613_, List<Component> p_43096_, TooltipFlag p_43097_) booleancanPerformAction(ItemStack stack, ToolAction toolAction) Queries if an item can perform the given action.getDescriptionId(ItemStack p_43109_) getUseAnimation(ItemStack p_43105_) intgetUseDuration(ItemStack p_43107_, LivingEntity p_346168_) booleanisValidRepairItem(ItemStack p_43091_, ItemStack p_43092_) use(Level p_43099_, Player p_43100_, InteractionHand p_43101_) Methods 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, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getId, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRenderPropertiesInternal, getTooltipImage, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEnchantable, isFoil, isRepairable, mineBlock, modifyDefaultComponentsFrom, onCraftedBy, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, postHurtEnemy, releaseUsing, 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.item.Equipable
getEquipSound, swapWithEquipmentSlotMethods 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, shouldCauseReequipAnimation
-
Field Details
-
EFFECTIVE_BLOCK_DELAY
public static final int EFFECTIVE_BLOCK_DELAY- See Also:
-
MINIMUM_DURABILITY_DAMAGE
public static final float MINIMUM_DURABILITY_DAMAGE- See Also:
-
-
Constructor Details
-
ShieldItem
-
-
Method Details
-
getDescriptionId
- Overrides:
getDescriptionIdin classItem
-
appendHoverText
public void appendHoverText(ItemStack p_43094_, Item.TooltipContext p_339613_, List<Component> p_43096_, TooltipFlag p_43097_) - Overrides:
appendHoverTextin classItem
-
getUseAnimation
- Overrides:
getUseAnimationin classItem
-
getUseDuration
- Overrides:
getUseDurationin classItem
-
use
public InteractionResultHolder<ItemStack> use(Level p_43099_, Player p_43100_, InteractionHand p_43101_) -
isValidRepairItem
- Overrides:
isValidRepairItemin classItem
-
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
-
getEquipmentSlot
- Specified by:
getEquipmentSlotin interfaceEquipable
-