Package net.minecraft.item
Class ShieldItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.ShieldItem
- All Implemented Interfaces:
ItemConvertible
public class ShieldItem extends Item
-
Nested Class Summary
-
Field Summary
Fields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_ID, ATTACK_SPEED_MODIFIER_ID, BLOCK_ITEMS, group, RANDOM -
Constructor Summary
Constructors Constructor Description ShieldItem(Item.Settings settings) -
Method Summary
Modifier and Type Method Description voidappendTooltip(ItemStack stack, World world, List<Text> tooltip, TooltipContext context)booleancanRepair(ItemStack stack, ItemStack ingredient)static DyeColorgetColor(ItemStack stack)intgetMaxUseTime(ItemStack stack)StringgetTranslationKey(ItemStack stack)UseActiongetUseAction(ItemStack stack)TypedActionResult<ItemStack>use(World world, PlayerEntity user, Hand hand)Methods inherited from class net.minecraft.item.Item
appendStacks, asItem, byRawId, canMine, damage, finishUsing, fromBlock, getAttributeModifiers, getDrinkSound, getEatSound, getEnchantability, getFoodComponent, getGroup, getMaxCount, getMaxDamage, getMiningSpeedMultiplier, getName, getName, getOrCreateTranslationKey, getRarity, getRawId, getRecipeRemainder, getStackForRender, getTranslationKey, hasEnchantmentGlint, hasRecipeRemainder, inventoryTick, isDamageable, isEffectiveOn, isEnchantable, isFireproof, isFood, isIn, isIn, isNetworkSynced, isUsedOnRelease, onCraft, onStoppedUsing, postHit, postMine, postProcessTag, rayTrace, shouldSyncTagToClient, toString, usageTick, useOnBlock, useOnEntity
-
Constructor Details
-
Method Details
-
getTranslationKey
- Overrides:
getTranslationKeyin classItem
-
appendTooltip
@Environment(CLIENT) public void appendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context)- Overrides:
appendTooltipin classItem
-
getUseAction
- Overrides:
getUseActionin classItem
-
getMaxUseTime
- Overrides:
getMaxUseTimein classItem
-
use
-
canRepair
-
getColor
-