Package net.minecraft.item
Class Item
java.lang.Object
net.minecraft.item.Item
- All Implemented Interfaces:
Itemable
- Direct Known Subclasses:
ArmorItem,ArmorStandItem,BlockItem,BoatItem,BookItem,BowItem,BucketItem,CarrotOnAStickItem,class_2680,class_3056,class_3187,class_3547,class_3558,class_3562,class_3564,ClockItem,CompassItem,DyeItem,EggItem,ElytraItem,EnchantedBookItem,EndCrystalItem,EnderEyeItem,EnderPearlItem,ExperienceBottleItem,FireChargeItem,FireworkChargeItem,FireworkItem,FishingRodItem,FlintAndSteelItem,FoodItem,GlassBottleItem,LeadItem,MilkBucketItem,MinecartItem,MusicDiscItem,NameTagItem,NetherStarItem,NetworkSyncedItem,PotionItem,SaddleItem,SeedItem,ShearsItem,ShieldItem,SnowballItem,WallHangableItem,WritableBookItem,WrittenBookItem
The Item class provides useful methods and fields for creation of Items.
All items extend the Item class.
The Item class also registers all items.
- See Also:
- Mappings:
Namespace Name official ataintermediary net/minecraft/class_1069named net/minecraft/item/Item
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final UUIDprotected static final UUIDA map containing all BlockItems, with their corresponding Block and Item variantsprivate static final ItemPropertyGetterprivate static final ItemPropertyGetterprivate static final ItemPropertyGetterprivate static final ItemPropertyGetterprivate final Rarityprotected final ItemGroupprivate final intThe maximum stack size of an itemprivate final intThe maximum durability of an Itemprivate final Map<Identifier,ItemPropertyGetter> protected static Randomprivate final ItemThe item's recipe remainder.private StringThe Item's translation key. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddProperty(Identifier identifier, ItemPropertyGetter itemPropertyGetter) voidappendToItemGroup(ItemGroup group, DefaultedList<ItemStack> stacks) voidappendTooltips(ItemStack stack, World world, List<Text> tooltip, TooltipContext tooltipContext) booleanbeforeBlockBreak(BlockState state, World world, BlockPos pos, PlayerEntity player) static ItembyRawId(int id) Returns an Item for its numeric Idprotected booleanbooleanReturns whether the item can be repaired via an anvil or crafting table.protected Stringstatic ItemDeprecated.floatgetBlockBreakingSpeed(ItemStack stack, BlockState state) intReturns the enchantability of an Item.getItem()final ItemGroupReturns the itemgroup that the item is infinal intReturns the max stack size of an Itemfinal intReturns the maximum durability of the current Item.intgetMaxUseTime(ItemStack stack) getProperty(Identifier identifier) Returns the rarity of the current Item.static intReturns a numeric id for an Itemfinal ItemReturns the current Item's recipe remainderReturns the translation key of the current ItemgetTranslationKey(ItemStack stack) getUseAction(ItemStack stack) Returns the UseAction for an item when the item is used.booleanhasEnchantmentGlint(ItemStack stack) Returns whether the current item has an enchantment glint.booleanvoidinventoryTick(ItemStack stack, World world, Entity entity, int slot, boolean selected) Runs every tick when the item is in an inventory.booleanReturns whether the current item is damageable.booleanisEnchantable(ItemStack stack) Returns whether the current item can have enchantments.booleanisFood()booleanmethod_13649(World world, PlayerEntity player, Hand hand) private static voidmethod_16074(Identifier identifier, Item item) booleanmethod_16075(Tag<Item> tag) booleanmethod_3346(BlockState blockState) booleanmethod_3353(ItemStack itemStack, PlayerEntity playerEntity, LivingEntity livingEntity, Hand hand) booleanmethod_3356(ItemStack itemStack, World world, BlockState blockState, BlockPos blockPos, LivingEntity livingEntity) voidmethod_3359(ItemStack stack, World world, LivingEntity entity, int int2) method_3367(ItemStack stack, World world, LivingEntity entity) method_3383(ItemStack itemStack) method_6326(EquipmentSlot equipmentSlot) voidonCraft(ItemStack stack, World world, PlayerEntity player) Runs when the item is craftedbooleanonEntityHit(ItemStack stack, LivingEntity entity1, LivingEntity entity2) protected BlockHitResultonHit(World world, PlayerEntity player, boolean liquid) Returns the HitResult for an item when the player's arm is swung while holding the item.booleanprivate static voidprivate static voidprivate static voidprivate static voidregisterBlockItem(Block block) Overloaded method that registers a BlockItem to the registryprotected static voidregisterBlockItem(Block block, Item blockItem) Registers a BlockItem to the registrystatic voidsetup()This is the main method in the Item class.booleanuseOnBlock(ItemUsageContext itemUsageContext)
-
Field Details
-
BLOCK_ITEMS
A map containing all BlockItems, with their corresponding Block and Item variants- Mappings:
Namespace Name Mixin selector official fLata;f:Ljava/util/Map;intermediary field_12183Lnet/minecraft/class_1069;field_12183:Ljava/util/Map;named BLOCK_ITEMSLnet/minecraft/item/Item;BLOCK_ITEMS:Ljava/util/Map;
-
GETTER_DAMAGED
- Mappings:
Namespace Name Mixin selector official aLata;a:Latd;intermediary field_12299Lnet/minecraft/class_1069;field_12299:Lnet/minecraft/class_2688;named GETTER_DAMAGEDLnet/minecraft/item/Item;GETTER_DAMAGED:Lnet/minecraft/item/ItemPropertyGetter;
-
GETTER_DAMAGE
- Mappings:
Namespace Name Mixin selector official bLata;b:Latd;intermediary field_12300Lnet/minecraft/class_1069;field_12300:Lnet/minecraft/class_2688;named GETTER_DAMAGELnet/minecraft/item/Item;GETTER_DAMAGE:Lnet/minecraft/item/ItemPropertyGetter;
-
GETTER_HAND
- Mappings:
Namespace Name Mixin selector official cLata;c:Latd;intermediary field_12301Lnet/minecraft/class_1069;field_12301:Lnet/minecraft/class_2688;named GETTER_HANDLnet/minecraft/item/Item;GETTER_HAND:Lnet/minecraft/item/ItemPropertyGetter;
-
GETTER_COOLDOWN
- Mappings:
Namespace Name Mixin selector official dLata;d:Latd;intermediary field_12302Lnet/minecraft/class_1069;field_12302:Lnet/minecraft/class_2688;named GETTER_COOLDOWNLnet/minecraft/item/Item;GETTER_COOLDOWN:Lnet/minecraft/item/ItemPropertyGetter;
-
ATTACK_DAMAGE_MODIFIER_UUID
- Mappings:
Namespace Name Mixin selector official gLata;g:Ljava/util/UUID;intermediary field_6947Lnet/minecraft/class_1069;field_6947:Ljava/util/UUID;named ATTACK_DAMAGE_MODIFIER_UUIDLnet/minecraft/item/Item;ATTACK_DAMAGE_MODIFIER_UUID:Ljava/util/UUID;
-
ATTACK_SPEED_MODIFIER
- Mappings:
Namespace Name Mixin selector official hLata;h:Ljava/util/UUID;intermediary field_12304Lnet/minecraft/class_1069;field_12304:Ljava/util/UUID;named ATTACK_SPEED_MODIFIERLnet/minecraft/item/Item;ATTACK_SPEED_MODIFIER:Ljava/util/UUID;
-
RANDOM
- Mappings:
Namespace Name Mixin selector official iLata;i:Ljava/util/Random;intermediary field_4342Lnet/minecraft/class_1069;field_4342:Ljava/util/Random;named RANDOMLnet/minecraft/item/Item;RANDOM:Ljava/util/Random;
-
PROPERTIES
- Mappings:
Namespace Name Mixin selector official eLata;e:Ljava/util/Map;intermediary field_17190Lnet/minecraft/class_1069;field_17190:Ljava/util/Map;named PROPERTIESLnet/minecraft/item/Item;PROPERTIES:Ljava/util/Map;
-
itemGroup
- Mappings:
Namespace Name Mixin selector official jLata;j:Lary;intermediary field_17191Lnet/minecraft/class_1069;field_17191:Lnet/minecraft/class_1041;named itemGroupLnet/minecraft/item/Item;itemGroup:Lnet/minecraft/item/itemgroup/ItemGroup;
-
itemCategory
- Mappings:
Namespace Name Mixin selector official kLata;k:Latq;intermediary field_17192Lnet/minecraft/class_1069;field_17192:Lnet/minecraft/class_1081;named itemCategoryLnet/minecraft/item/Item;itemCategory:Lnet/minecraft/util/Rarity;
-
maxCount
private final int maxCountThe maximum stack size of an item- Mappings:
Namespace Name Mixin selector official lLata;l:Iintermediary field_4309Lnet/minecraft/class_1069;field_4309:Inamed maxCountLnet/minecraft/item/Item;maxCount:I
-
maxDamage
private final int maxDamageThe maximum durability of an Item- Mappings:
Namespace Name Mixin selector official mLata;m:Iintermediary field_4296Lnet/minecraft/class_1069;field_4296:Inamed maxDamageLnet/minecraft/item/Item;maxDamage:I
-
recipeRemainder
The item's recipe remainder. Used by Buckets and potions.- See Also:
- Mappings:
Namespace Name Mixin selector official nLata;n:Lata;intermediary field_4341Lnet/minecraft/class_1069;field_4341:Lnet/minecraft/class_1069;named recipeRemainderLnet/minecraft/item/Item;recipeRemainder:Lnet/minecraft/item/Item;
-
translationKey
The Item's translation key.- Mappings:
Namespace Name Mixin selector official oLata;o:Ljava/lang/String;intermediary field_4314Lnet/minecraft/class_1069;field_4314:Ljava/lang/String;named translationKeyLnet/minecraft/item/Item;translationKey:Ljava/lang/String;
-
-
Constructor Details
-
Item
- Mappings:
Namespace Name Mixin selector official <init>Lata;<init>(Lata$a;)Vintermediary <init>Lnet/minecraft/class_1069;<init>(Lnet/minecraft/class_1069$class_3555;)Vnamed <init>Lnet/minecraft/item/Item;<init>(Lnet/minecraft/item/Item$Settings;)V
-
-
Method Details
-
getRawId
Returns a numeric id for an Item- Returns:
- Numeric Id
- Mappings:
Namespace Name Mixin selector official aLata;a(Lata;)Iintermediary method_6364Lnet/minecraft/class_1069;method_6364(Lnet/minecraft/class_1069;)Inamed getRawIdLnet/minecraft/item/Item;getRawId(Lnet/minecraft/item/Item;)I
-
byRawId
Returns an Item for its numeric Id- Returns:
- Item
- Mappings:
Namespace Name Mixin selector official bLata;b(I)Lata;intermediary method_6366Lnet/minecraft/class_1069;method_6366(I)Lnet/minecraft/class_1069;named byRawIdLnet/minecraft/item/Item;byRawId(I)Lnet/minecraft/item/Item;
-
fromBlock
Deprecated.Returns a BlockItem from a block- Returns:
- Block
- Mappings:
Namespace Name Mixin selector official aLata;a(Lbcs;)Lata;intermediary method_6363Lnet/minecraft/class_1069;method_6363(Lnet/minecraft/class_197;)Lnet/minecraft/class_1069;named fromBlockLnet/minecraft/item/Item;fromBlock(Lnet/minecraft/block/Block;)Lnet/minecraft/item/Item;
-
getProperty
- Mappings:
Namespace Name Mixin selector official aLata;a(Lpc;)Latd;intermediary method_11374Lnet/minecraft/class_1069;method_11374(Lnet/minecraft/class_1653;)Lnet/minecraft/class_2688;named getPropertyLnet/minecraft/item/Item;getProperty(Lnet/minecraft/util/Identifier;)Lnet/minecraft/item/ItemPropertyGetter;
-
hasProperties
- Mappings:
Namespace Name Mixin selector official gLata;g()Zintermediary method_11376Lnet/minecraft/class_1069;method_11376()Znamed hasPropertiesLnet/minecraft/item/Item;hasProperties()Z
-
postProcessNbt
- Mappings:
Namespace Name Mixin selector official aLata;a(Lgy;)Zintermediary method_11287Lnet/minecraft/class_1069;method_11287(Lnet/minecraft/class_322;)Znamed postProcessNbtLnet/minecraft/item/Item;postProcessNbt(Lnet/minecraft/nbt/NbtCompound;)Z
-
beforeBlockBreak
- Mappings:
Namespace Name Mixin selector official aLata;a(Lblc;Laxy;Lel;Laog;)Zintermediary method_16073Lnet/minecraft/class_1069;method_16073(Lnet/minecraft/class_2232;Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_988;)Znamed beforeBlockBreakLnet/minecraft/item/Item;beforeBlockBreak(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;)Z
-
getItem
-
addProperty
- Mappings:
Namespace Name Mixin selector official aLata;a(Lpc;Latd;)Vintermediary method_11375Lnet/minecraft/class_1069;method_11375(Lnet/minecraft/class_1653;Lnet/minecraft/class_2688;)Vnamed addPropertyLnet/minecraft/item/Item;addProperty(Lnet/minecraft/util/Identifier;Lnet/minecraft/item/ItemPropertyGetter;)V
-
useOnBlock
- Mappings:
Namespace Name Mixin selector official aLata;a(Laup;)Ladm;intermediary method_16071Lnet/minecraft/class_1069;method_16071(Lnet/minecraft/class_3565;)Lnet/minecraft/class_2962;named useOnBlockLnet/minecraft/item/Item;useOnBlock(Lnet/minecraft/item/ItemUsageContext;)Lnet/minecraft/util/ActionResult;
-
getBlockBreakingSpeed
- Mappings:
Namespace Name Mixin selector official aLata;a(Late;Lblc;)Fintermediary method_3351Lnet/minecraft/class_1069;method_3351(Lnet/minecraft/class_1071;Lnet/minecraft/class_2232;)Fnamed getBlockBreakingSpeedLnet/minecraft/item/Item;getBlockBreakingSpeed(Lnet/minecraft/item/ItemStack;Lnet/minecraft/block/BlockState;)F
-
method_13649
- Mappings:
Namespace Name Mixin selector official aLata;a(Laxy;Laog;Ladk;)Ladn;intermediary method_13649Lnet/minecraft/class_1069;method_13649(Lnet/minecraft/class_1150;Lnet/minecraft/class_988;Lnet/minecraft/class_2961;)Lnet/minecraft/class_2963;named method_13649Lnet/minecraft/item/Item;method_13649(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/TypedActionResult;
-
method_3367
- Mappings:
Namespace Name Mixin selector official aLata;a(Late;Laxy;Lafa;)Late;intermediary method_3367Lnet/minecraft/class_1069;method_3367(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_1699;)Lnet/minecraft/class_1071;named method_3367Lnet/minecraft/item/Item;method_3367(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;)Lnet/minecraft/item/ItemStack;
-
getMaxCount
public final int getMaxCount()Returns the max stack size of an Item- Returns:
- Max stack Size
- Mappings:
Namespace Name Mixin selector official iLata;i()Iintermediary method_3382Lnet/minecraft/class_1069;method_3382()Inamed getMaxCountLnet/minecraft/item/Item;getMaxCount()I
-
getMaxDamage
public final int getMaxDamage()Returns the maximum durability of the current Item.- Returns:
- Max Durability
- Mappings:
Namespace Name Mixin selector official jLata;j()Iintermediary method_3386Lnet/minecraft/class_1069;method_3386()Inamed getMaxDamageLnet/minecraft/item/Item;getMaxDamage()I
-
isDamageable
public boolean isDamageable()Returns whether the current item is damageable. Used by tools, armor, bows, etc. -
onEntityHit
- Mappings:
Namespace Name Mixin selector official aLata;a(Late;Lafa;Lafa;)Zintermediary method_3354Lnet/minecraft/class_1069;method_3354(Lnet/minecraft/class_1071;Lnet/minecraft/class_1699;Lnet/minecraft/class_1699;)Znamed onEntityHitLnet/minecraft/item/Item;onEntityHit(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;)Z
-
method_3356
public boolean method_3356(ItemStack itemStack, World world, BlockState blockState, BlockPos blockPos, LivingEntity livingEntity) - Mappings:
Namespace Name Mixin selector official aLata;a(Late;Laxy;Lblc;Lel;Lafa;)Zintermediary method_3356Lnet/minecraft/class_1069;method_3356(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_2232;Lnet/minecraft/class_2552;Lnet/minecraft/class_1699;)Znamed method_3356Lnet/minecraft/item/Item;method_3356(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/LivingEntity;)Z
-
method_3346
- Mappings:
Namespace Name Mixin selector official aLata;a(Lblc;)Zintermediary method_3346Lnet/minecraft/class_1069;method_3346(Lnet/minecraft/class_2232;)Znamed method_3346Lnet/minecraft/item/Item;method_3346(Lnet/minecraft/block/BlockState;)Z
-
method_3353
public boolean method_3353(ItemStack itemStack, PlayerEntity playerEntity, LivingEntity livingEntity, Hand hand) - Mappings:
Namespace Name Mixin selector official aLata;a(Late;Laog;Lafa;Ladk;)Zintermediary method_3353Lnet/minecraft/class_1069;method_3353(Lnet/minecraft/class_1071;Lnet/minecraft/class_988;Lnet/minecraft/class_1699;Lnet/minecraft/class_2961;)Znamed method_3353Lnet/minecraft/item/Item;method_3353(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/util/Hand;)Z
-
method_16080
- Mappings:
Namespace Name Mixin selector official lLata;l()Lij;intermediary method_16080Lnet/minecraft/class_1069;method_16080()Lnet/minecraft/class_1982;named method_16080Lnet/minecraft/item/Item;method_16080()Lnet/minecraft/text/Text;
-
computeTranslationKey
- Mappings:
Namespace Name Mixin selector official mLata;m()Ljava/lang/String;intermediary method_16081Lnet/minecraft/class_1069;method_16081()Ljava/lang/String;named computeTranslationKeyLnet/minecraft/item/Item;computeTranslationKey()Ljava/lang/String;
-
getTranslationKey
Returns the translation key of the current Item- Returns:
- Translation key
- Mappings:
Namespace Name Mixin selector official aLata;a()Ljava/lang/String;intermediary method_3342Lnet/minecraft/class_1069;method_3342()Ljava/lang/String;named getTranslationKeyLnet/minecraft/item/Item;getTranslationKey()Ljava/lang/String;
-
getTranslationKey
- Mappings:
Namespace Name Mixin selector official hLata;h(Late;)Ljava/lang/String;intermediary method_3371Lnet/minecraft/class_1069;method_3371(Lnet/minecraft/class_1071;)Ljava/lang/String;named getTranslationKeyLnet/minecraft/item/Item;getTranslationKey(Lnet/minecraft/item/ItemStack;)Ljava/lang/String;
-
shouldSyncNbtToClient
public boolean shouldSyncNbtToClient()- Mappings:
Namespace Name Mixin selector official nLata;n()Zintermediary method_3391Lnet/minecraft/class_1069;method_3391()Znamed shouldSyncNbtToClientLnet/minecraft/item/Item;shouldSyncNbtToClient()Z
-
getRecipeRemainder
Returns the current Item's recipe remainder- Returns:
- recipeRemainder
- Mappings:
Namespace Name Mixin selector official oLata;o()Lata;intermediary method_3392Lnet/minecraft/class_1069;method_3392()Lnet/minecraft/class_1069;named getRecipeRemainderLnet/minecraft/item/Item;getRecipeRemainder()Lnet/minecraft/item/Item;
-
isFood
public boolean isFood()- Mappings:
Namespace Name Mixin selector official pLata;p()Zintermediary method_3393Lnet/minecraft/class_1069;method_3393()Znamed isFoodLnet/minecraft/item/Item;isFood()Z
-
inventoryTick
Runs every tick when the item is in an inventory.- Parameters:
stack- The item in an ItemStack formworld- The world where the item is tickingentity- The entity whose inventory contains the itemslot- The slot in which the item is placedselected- Whether the item is currently selected by the entity- Mappings:
Namespace Name Mixin selector official aLata;a(Late;Laxy;Laer;IZ)Vintermediary method_3357Lnet/minecraft/class_1069;method_3357(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_864;IZ)Vnamed inventoryTickLnet/minecraft/item/Item;inventoryTick(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/Entity;IZ)V
-
onCraft
Runs when the item is crafted- Parameters:
stack- The item in an ItemStack formworld- The world where the crafting happenedplayer- The player who crafted the item- Mappings:
Namespace Name Mixin selector official bLata;b(Late;Laxy;Laog;)Vintermediary method_3375Lnet/minecraft/class_1069;method_3375(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_988;)Vnamed onCraftLnet/minecraft/item/Item;onCraft(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;)V
-
isNetworkSynced
public boolean isNetworkSynced()- Mappings:
Namespace Name Mixin selector official W_Lata;W_()Zintermediary method_3388Lnet/minecraft/class_1069;method_3388()Znamed isNetworkSyncedLnet/minecraft/item/Item;isNetworkSynced()Z
-
getUseAction
Returns the UseAction for an item when the item is used. Used by food, potions, bows, etc.- Parameters:
stack- The ItemStack that was used- See Also:
- Mappings:
Namespace Name Mixin selector official dLata;d(Late;)Lauo;intermediary method_3366Lnet/minecraft/class_1069;method_3366(Lnet/minecraft/class_1071;)Lnet/minecraft/class_1099;named getUseActionLnet/minecraft/item/Item;getUseAction(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/UseAction;
-
getMaxUseTime
- Mappings:
Namespace Name Mixin selector official cLata;c(Late;)Iintermediary method_3350Lnet/minecraft/class_1069;method_3350(Lnet/minecraft/class_1071;)Inamed getMaxUseTimeLnet/minecraft/item/Item;getMaxUseTime(Lnet/minecraft/item/ItemStack;)I
-
method_3359
- Mappings:
Namespace Name Mixin selector official aLata;a(Late;Laxy;Lafa;I)Vintermediary method_3359Lnet/minecraft/class_1069;method_3359(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_1699;I)Vnamed method_3359Lnet/minecraft/item/Item;method_3359(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;I)V
-
appendTooltips
@Environment(CLIENT) public void appendTooltips(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext tooltipContext) - Mappings:
Namespace Name Mixin selector official aLata;a(Late;Laxy;Ljava/util/List;Laum;)Vintermediary method_14234Lnet/minecraft/class_1069;method_14234(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Ljava/util/List;Lnet/minecraft/class_3191;)Vnamed appendTooltipsLnet/minecraft/item/Item;appendTooltips(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Ljava/util/List;Lnet/minecraft/client/TooltipContext;)V
-
method_3383
- Mappings:
Namespace Name Mixin selector official iLata;i(Late;)Lij;intermediary method_3383Lnet/minecraft/class_1069;method_3383(Lnet/minecraft/class_1071;)Lnet/minecraft/class_1982;named method_3383Lnet/minecraft/item/Item;method_3383(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/text/Text;
-
hasEnchantmentGlint
Returns whether the current item has an enchantment glint. Used by enchanted golden apples and enchanted items.- See Also:
-
net.minecraft.item.GoldenAppleItem
- Mappings:
Namespace Name Mixin selector official bLata;b(Late;)Zintermediary method_3374Lnet/minecraft/class_1069;method_3374(Lnet/minecraft/class_1071;)Znamed hasEnchantmentGlintLnet/minecraft/item/Item;hasEnchantmentGlint(Lnet/minecraft/item/ItemStack;)Z
-
getRarity
Returns the rarity of the current Item. Used by golden apples, enchanted items and potions.- Parameters:
stack- The item in an ItemStack form- Returns:
- The rarity of the ItemStack
- See Also:
-
net.minecraft.item.GoldenAppleItemPotionItem
- Mappings:
Namespace Name Mixin selector official jLata;j(Late;)Latq;intermediary method_3377Lnet/minecraft/class_1069;method_3377(Lnet/minecraft/class_1071;)Lnet/minecraft/class_1081;named getRarityLnet/minecraft/item/Item;getRarity(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/Rarity;
-
isEnchantable
Returns whether the current item can have enchantments. It does this by verifying that the item's maximum stack size is 1 and the item can break.- Mappings:
Namespace Name Mixin selector official aLata;a(Late;)Zintermediary method_3385Lnet/minecraft/class_1069;method_3385(Lnet/minecraft/class_1071;)Znamed isEnchantableLnet/minecraft/item/Item;isEnchantable(Lnet/minecraft/item/ItemStack;)Z
-
onHit
Returns the HitResult for an item when the player's arm is swung while holding the item.- Parameters:
world- The world that the item is inplayer- The player holding the item- Returns:
- HitResult
- Mappings:
Namespace Name Mixin selector official aLata;a(Laxy;Laog;Z)Lceb;intermediary method_3360Lnet/minecraft/class_1069;method_3360(Lnet/minecraft/class_1150;Lnet/minecraft/class_988;Z)Lnet/minecraft/class_234;named onHitLnet/minecraft/item/Item;onHit(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Z)Lnet/minecraft/util/hit/BlockHitResult;
-
getEnchantability
public int getEnchantability()Returns the enchantability of an Item. Used by tools and armor -
appendToItemGroup
- Mappings:
Namespace Name Mixin selector official aLata;a(Lary;Lez;)Vintermediary method_14233Lnet/minecraft/class_1069;method_14233(Lnet/minecraft/class_1041;Lnet/minecraft/class_3114;)Vnamed appendToItemGroupLnet/minecraft/item/Item;appendToItemGroup(Lnet/minecraft/item/itemgroup/ItemGroup;Lnet/minecraft/util/collection/DefaultedList;)V
-
canAddTo
- Mappings:
Namespace Name Mixin selector official aLata;a(Lary;)Zintermediary method_14232Lnet/minecraft/class_1069;method_14232(Lnet/minecraft/class_1041;)Znamed canAddToLnet/minecraft/item/Item;canAddTo(Lnet/minecraft/item/itemgroup/ItemGroup;)Z
-
getItemGroup
Returns the itemgroup that the item is in- Mappings:
Namespace Name Mixin selector official qLata;q()Lary;intermediary method_3398Lnet/minecraft/class_1069;method_3398()Lnet/minecraft/class_1041;named getItemGroupLnet/minecraft/item/Item;getItemGroup()Lnet/minecraft/item/itemgroup/ItemGroup;
-
canRepair
Returns whether the item can be repaired via an anvil or crafting table.- Mappings:
Namespace Name Mixin selector official aLata;a(Late;Late;)Zintermediary method_4615Lnet/minecraft/class_1069;method_4615(Lnet/minecraft/class_1071;Lnet/minecraft/class_1071;)Znamed canRepairLnet/minecraft/item/Item;canRepair(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z
-
method_6326
- Mappings:
Namespace Name Mixin selector official aLata;a(Laew;)Lcom/google/common/collect/Multimap;intermediary method_6326Lnet/minecraft/class_1069;method_6326(Lnet/minecraft/class_2968;)Lcom/google/common/collect/Multimap;named method_6326Lnet/minecraft/item/Item;method_6326(Lnet/minecraft/entity/EquipmentSlot;)Lcom/google/common/collect/Multimap;
-
setup
public static void setup()This is the main method in the Item class. Both Items and BlockItems get registered here. The Item Ids starts from 256. The fields in the class Items can not be accessed before this method is called.- See Also:
- Mappings:
Namespace Name Mixin selector official rLata;r()Vintermediary method_6368Lnet/minecraft/class_1069;method_6368()Vnamed setupLnet/minecraft/item/Item;setup()V
-
registerBlockItem
Overloaded method that registers a BlockItem to the registry- Parameters:
block- The block- Mappings:
Namespace Name Mixin selector official bLata;b(Lbcs;)Vintermediary method_11288Lnet/minecraft/class_1069;method_11288(Lnet/minecraft/class_197;)Vnamed registerBlockItemLnet/minecraft/item/Item;registerBlockItem(Lnet/minecraft/block/Block;)V
-
register
- Mappings:
Namespace Name Mixin selector official aLata;a(Lbcs;Lary;)Vintermediary method_16072Lnet/minecraft/class_1069;method_16072(Lnet/minecraft/class_197;Lnet/minecraft/class_1041;)Vnamed registerLnet/minecraft/item/Item;register(Lnet/minecraft/block/Block;Lnet/minecraft/item/itemgroup/ItemGroup;)V
-
register
- Mappings:
Namespace Name Mixin selector official aLata;a(Larj;)Vintermediary method_16070Lnet/minecraft/class_1069;method_16070(Lnet/minecraft/class_1096;)Vnamed registerLnet/minecraft/item/Item;register(Lnet/minecraft/item/BlockItem;)V
-
registerBlockItem
Registers a BlockItem to the registry- Parameters:
block- The BlockblockItem- The BlockItem- Mappings:
Namespace Name Mixin selector official aLata;a(Lbcs;Lata;)Vintermediary method_11286Lnet/minecraft/class_1069;method_11286(Lnet/minecraft/class_197;Lnet/minecraft/class_1069;)Vnamed registerBlockItemLnet/minecraft/item/Item;registerBlockItem(Lnet/minecraft/block/Block;Lnet/minecraft/item/Item;)V
-
register
- Mappings:
Namespace Name Mixin selector official aLata;a(Ljava/lang/String;Lata;)Vintermediary method_11284Lnet/minecraft/class_1069;method_11284(Ljava/lang/String;Lnet/minecraft/class_1069;)Vnamed registerLnet/minecraft/item/Item;register(Ljava/lang/String;Lnet/minecraft/item/Item;)V
-
method_16074
- Mappings:
Namespace Name Mixin selector official aLata;a(Lpc;Lata;)Vintermediary method_16074Lnet/minecraft/class_1069;method_16074(Lnet/minecraft/class_1653;Lnet/minecraft/class_1069;)Vnamed method_16074Lnet/minecraft/item/Item;method_16074(Lnet/minecraft/util/Identifier;Lnet/minecraft/item/Item;)V
-
getDefaultStack
- Mappings:
Namespace Name Mixin selector official sLata;s()Late;intermediary method_13650Lnet/minecraft/class_1069;method_13650()Lnet/minecraft/class_1071;named getDefaultStackLnet/minecraft/item/Item;getDefaultStack()Lnet/minecraft/item/ItemStack;
-
method_16075
- Mappings:
Namespace Name Mixin selector official aLata;a(Lwz;)Zintermediary method_16075Lnet/minecraft/class_1069;method_16075(Lnet/minecraft/class_4482;)Znamed method_16075Lnet/minecraft/item/Item;method_16075(Lnet/minecraft/tag/Tag;)Z
-