Package net.minecraft.item
Class Item
java.lang.Object
net.minecraft.item.Item
- Direct Known Subclasses:
ArmorItem,BedItem,BlockItem,BoatItem,BookItem,BowItem,BucketItem,CarrotOnAStickItem,CoalItem,DyeItem,EggItem,EnchantedBookItem,EnderEyeItem,EnderPearlItem,ExperienceBottleItem,FireChargeItem,FireworkChargeItem,FireworkItem,FishingRodItem,FlintAndSteelItem,FoodItem,GlassBottleItem,HoeItem,LeadItem,MilkBucketItem,MinecartItem,MusicDiscItem,NameTagItem,NetherStarItem,NetworkSyncedItem,PlaceableItem,PotionItem,RedstoneItem,SaddleItem,SeedItem,ShearsItem,SignItem,SkullItem,SnowballItem,SpawnEggItem,SwordItem,ToolItem,WallHangableItem,WoodenDoorItem,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 abmintermediary net/minecraft/class_1069named net/minecraft/item/Item
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final UUIDprotected booleanSets whether the item has durabilityprotected Textureprotected Stringprivate ItemGroupThe Item's ItemGroupprotected booleanSets whether the item is handheldprotected intThe maximum stack size of an itemprivate intThe maximum durability of an Itemprotected static Randomprivate ItemThe item's recipe remainder.static final SimpleRegistryThe Registry where all items get registered to.private StringA description of the brewing recipe for their ingredientsprivate StringThe Item's translation key. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendItemStacks(Item item, ItemGroup group, List list) Registers an item's sub itemsvoidappendTooltip(ItemStack stack, PlayerEntity player, List lines, boolean advanced) static ItembyRawId(int id) Returns an Item for its numeric IdbooleanReturns whether the item can be repaired via an anvil or crafting table.booleancanUseOnEntity(ItemStack stack, PlayerEntity player, LivingEntity entity) static ItemReturns a BlockItem from a blockReturns a map containing entity attributes that are modified by the itemintgetDisplayColor(ItemStack stack, int color) getDisplayName(ItemStack stack) intReturns the enchantability of an Item.protected ItemReturns an Item from its name or its numeric Id as a StringReturns the itemgroup that the item is inReturns the translated name of an ItemStackintReturns the max stack size of an ItemintReturns the maximum durability of the current Item.intgetMaxUseTime(ItemStack stack) intgetMeta(int i) floatgetMiningSpeedMultiplier(ItemStack stack, Block block) Returns the rarity of the current Item.static intReturns a numeric id for an ItemReturns the current Item's recipe remaindergetStatusEffectString(ItemStack stack) Returns the status effect string for the current item.Returns 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.booleanhasStatusEffectString(ItemStack stack) Returns whether the current item has a status effect stringbooleanvoidinventoryTick(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.booleanisEffectiveOn(Block block) booleanisEnchantable(ItemStack stack) Returns whether the current item can have enchantments.booleanisFood()booleanReturns whether the item is supposed to look as handheld.booleanbooleanReturns whether the item is unbreakablemethod_3343(int int2) booleanmethod_3355(ItemStack itemStack, PlayerEntity playerEntity, World world, int int2, int int3, int int4, int int5, float float2, float float3, float float4) booleanmethod_3356(ItemStack itemStack, World world, Block block, int int2, int int3, int int4, LivingEntity livingEntity) method_3369(int int2, int int3) final Texturemethod_3378(ItemStack itemStack) booleanmethod_3380(ItemStack itemStack) booleanvoidmethod_5462(TextureRegistry textureRegistry) intprotected StringvoidonCraft(ItemStack stack, World world, PlayerEntity player) Runs when the item is craftedbooleanonEntityHit(ItemStack stack, LivingEntity entity1, LivingEntity entity2) onFinishUse(ItemStack stack, World world, PlayerEntity player) 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.onStartUse(ItemStack stack, World world, PlayerEntity player) voidonUseStopped(ItemStack stack, World world, PlayerEntity player, int remainingTicks) Sets the item to look as handheld.setItemGroup(ItemGroup group) Sets the itemgroup that the current item should be insetMaxCount(int count) Sets the max stack size of the Itemprotected ItemsetMaxDamage(int damage) Sets the maximum durability of the current Item.setRecipeRemainder(Item recipeRemainder) Sets the item's recipe remainderprotected ItemsetStatusEffectString(String statusEffectString) Sets the status effect string for the current item.setTranslationKey(String translationKey) Sets the current item's translation key.protected ItemsetUnbreakable(boolean unbreakable) Sets the current item as unbreakable.static voidsetup()This is the main method in the Item class.booleanboolean
-
Field Details
-
REGISTRY
The Registry where all items get registered to.- Mappings:
Namespace Name Mixin selector official eLabm;e:Lcv;intermediary field_6973Lnet/minecraft/class_1069;field_6973:Lnet/minecraft/class_1943;named REGISTRYLnet/minecraft/item/Item;REGISTRY:Lnet/minecraft/util/registry/SimpleRegistry;
-
ATTACK_DAMAGE_MODIFIER_UUID
- Mappings:
Namespace Name Mixin selector official fLabm;f: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;
-
RANDOM
- Mappings:
Namespace Name Mixin selector official gLabm;g:Ljava/util/Random;intermediary field_4342Lnet/minecraft/class_1069;field_4342:Ljava/util/Random;named RANDOMLnet/minecraft/item/Item;RANDOM:Ljava/util/Random;
-
group
The Item's ItemGroup- Mappings:
Namespace Name Mixin selector official aLabm;a:Laae;intermediary field_4247Lnet/minecraft/class_1069;field_4247:Lnet/minecraft/class_1041;named groupLnet/minecraft/item/Item;group:Lnet/minecraft/item/itemgroup/ItemGroup;
-
maxCount
protected int maxCountThe maximum stack size of an item- Mappings:
Namespace Name Mixin selector official hLabm;h:Iintermediary field_4309Lnet/minecraft/class_1069;field_4309:Inamed maxCountLnet/minecraft/item/Item;maxCount:I
-
maxDamage
private int maxDamageThe maximum durability of an Item- Mappings:
Namespace Name Mixin selector official bLabm;b:Iintermediary field_4296Lnet/minecraft/class_1069;field_4296:Inamed maxDamageLnet/minecraft/item/Item;maxDamage:I
-
handheld
protected boolean handheldSets whether the item is handheld- Mappings:
Namespace Name Mixin selector official iLabm;i:Zintermediary field_4311Lnet/minecraft/class_1069;field_4311:Znamed handheldLnet/minecraft/item/Item;handheld:Z
-
damageable
protected boolean damageableSets whether the item has durability- Mappings:
Namespace Name Mixin selector official jLabm;j:Zintermediary field_4312Lnet/minecraft/class_1069;field_4312:Znamed damageableLnet/minecraft/item/Item;damageable:Z
-
recipeRemainder
The item's recipe remainder. Used by Buckets and potions.- See Also:
- Mappings:
Namespace Name Mixin selector official cLabm;c:Labm;intermediary field_4341Lnet/minecraft/class_1069;field_4341:Lnet/minecraft/class_1069;named recipeRemainderLnet/minecraft/item/Item;recipeRemainder:Lnet/minecraft/item/Item;
-
statusEffectString
A description of the brewing recipe for their ingredients- Mappings:
Namespace Name Mixin selector official dLabm;d:Ljava/lang/String;intermediary field_4313Lnet/minecraft/class_1069;field_4313:Ljava/lang/String;named statusEffectStringLnet/minecraft/item/Item;statusEffectString:Ljava/lang/String;
-
translationKey
The Item's translation key.- Mappings:
Namespace Name Mixin selector official mLabm;m:Ljava/lang/String;intermediary field_4314Lnet/minecraft/class_1069;field_4314:Ljava/lang/String;named translationKeyLnet/minecraft/item/Item;translationKey:Ljava/lang/String;
-
field_6201
- Mappings:
Namespace Name Mixin selector official kLabm;k:Lpr;intermediary field_6201Lnet/minecraft/class_1069;field_6201:Lnet/minecraft/class_1557;named field_6201Lnet/minecraft/item/Item;field_6201:Lnet/minecraft/client/Texture;
-
field_6941
- Mappings:
Namespace Name Mixin selector official lLabm;l:Ljava/lang/String;intermediary field_6941Lnet/minecraft/class_1069;field_6941:Ljava/lang/String;named field_6941Lnet/minecraft/item/Item;field_6941:Ljava/lang/String;
-
-
Constructor Details
-
Item
public Item()Sets the max stack size of an Item to 64- Mappings:
Namespace Name Mixin selector official <init>Labm;<init>()Vintermediary <init>Lnet/minecraft/class_1069;<init>()Vnamed <init>Lnet/minecraft/item/Item;<init>()V
-
-
Method Details
-
getRawId
Returns a numeric id for an Item- Returns:
- Numeric Id
- Mappings:
Namespace Name Mixin selector official bLabm;b(Labm;)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 dLabm;d(I)Labm;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
Returns a BlockItem from a block- Returns:
- Block
- Mappings:
Namespace Name Mixin selector official aLabm;a(Laht;)Labm;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;
-
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 lLabm;l()Vintermediary method_6368Lnet/minecraft/class_1069;method_6368()Vnamed setupLnet/minecraft/item/Item;setup()V
-
setMaxCount
Sets the max stack size of the Item- Parameters:
count- Maximum stack size- Returns:
- The current Item
- Mappings:
Namespace Name Mixin selector official eLabm;e(I)Labm;intermediary method_3373Lnet/minecraft/class_1069;method_3373(I)Lnet/minecraft/class_1069;named setMaxCountLnet/minecraft/item/Item;setMaxCount(I)Lnet/minecraft/item/Item;
-
method_5463
- Mappings:
Namespace Name Mixin selector official dLabm;d()Iintermediary method_5463Lnet/minecraft/class_1069;method_5463()Inamed method_5463Lnet/minecraft/item/Item;method_5463()I
-
method_3343
- Mappings:
Namespace Name Mixin selector official b_Labm;b_(I)Lpr;intermediary method_3343Lnet/minecraft/class_1069;method_3343(I)Lnet/minecraft/class_1557;named method_3343Lnet/minecraft/item/Item;method_3343(I)Lnet/minecraft/client/Texture;
-
method_3378
- Mappings:
Namespace Name Mixin selector official jLabm;j(Labo;)Lpr;intermediary method_3378Lnet/minecraft/class_1069;method_3378(Lnet/minecraft/class_1071;)Lnet/minecraft/class_1557;named method_3378Lnet/minecraft/item/Item;method_3378(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/client/Texture;
-
method_3355
public boolean method_3355(ItemStack itemStack, PlayerEntity playerEntity, World world, int int2, int int3, int int4, int int5, float float2, float float3, float float4) - Mappings:
Namespace Name Mixin selector official aLabm;a(Labo;Lxk;Lafm;IIIIFFF)Zintermediary method_3355Lnet/minecraft/class_1069;method_3355(Lnet/minecraft/class_1071;Lnet/minecraft/class_988;Lnet/minecraft/class_1150;IIIIFFF)Znamed method_3355Lnet/minecraft/item/Item;method_3355(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/world/World;IIIIFFF)Z
-
getMiningSpeedMultiplier
- Mappings:
Namespace Name Mixin selector official aLabm;a(Labo;Laht;)Fintermediary method_3351Lnet/minecraft/class_1069;method_3351(Lnet/minecraft/class_1071;Lnet/minecraft/class_197;)Fnamed getMiningSpeedMultiplierLnet/minecraft/item/Item;getMiningSpeedMultiplier(Lnet/minecraft/item/ItemStack;Lnet/minecraft/block/Block;)F
-
onStartUse
- Mappings:
Namespace Name Mixin selector official aLabm;a(Labo;Lafm;Lxk;)Labo;intermediary method_3358Lnet/minecraft/class_1069;method_3358(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_988;)Lnet/minecraft/class_1071;named onStartUseLnet/minecraft/item/Item;onStartUse(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/item/ItemStack;
-
onFinishUse
- Mappings:
Namespace Name Mixin selector official bLabm;b(Labo;Lafm;Lxk;)Labo;intermediary method_3367Lnet/minecraft/class_1069;method_3367(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_988;)Lnet/minecraft/class_1071;named onFinishUseLnet/minecraft/item/Item;onFinishUse(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/item/ItemStack;
-
getMaxCount
public int getMaxCount()Returns the max stack size of an Item- Returns:
- Max stack Size
- Mappings:
Namespace Name Mixin selector official mLabm;m()Iintermediary method_3382Lnet/minecraft/class_1069;method_3382()Inamed getMaxCountLnet/minecraft/item/Item;getMaxCount()I
-
getMeta
public int getMeta(int i) - Mappings:
Namespace Name Mixin selector official aLabm;a(I)Iintermediary method_3363Lnet/minecraft/class_1069;method_3363(I)Inamed getMetaLnet/minecraft/item/Item;getMeta(I)I
-
isUnbreakable
public boolean isUnbreakable()Returns whether the item is unbreakable- Returns:
- Whether the item is unbreakable
- Mappings:
Namespace Name Mixin selector official nLabm;n()Zintermediary method_3384Lnet/minecraft/class_1069;method_3384()Znamed isUnbreakableLnet/minecraft/item/Item;isUnbreakable()Z
-
setUnbreakable
Sets the current item as unbreakable.- Parameters:
unbreakable- Unbreakable- Returns:
- The current Item
- Mappings:
Namespace Name Mixin selector official aLabm;a(Z)Labm;intermediary method_3361Lnet/minecraft/class_1069;method_3361(Z)Lnet/minecraft/class_1069;named setUnbreakableLnet/minecraft/item/Item;setUnbreakable(Z)Lnet/minecraft/item/Item;
-
getMaxDamage
public int getMaxDamage()Returns the maximum durability of the current Item.- Returns:
- Max Durability
- Mappings:
Namespace Name Mixin selector official oLabm;o()Iintermediary method_3386Lnet/minecraft/class_1069;method_3386()Inamed getMaxDamageLnet/minecraft/item/Item;getMaxDamage()I
-
setMaxDamage
Sets the maximum durability of the current Item.- Parameters:
damage- Maximum durability- Returns:
- The current Item
- Mappings:
Namespace Name Mixin selector official fLabm;f(I)Labm;intermediary method_3376Lnet/minecraft/class_1069;method_3376(I)Lnet/minecraft/class_1069;named setMaxDamageLnet/minecraft/item/Item;setMaxDamage(I)Lnet/minecraft/item/Item;
-
isDamageable
public boolean isDamageable()Returns whether the current item is damageable. Used by tools, armor, bows, etc. -
onEntityHit
- Mappings:
Namespace Name Mixin selector official aLabm;a(Labo;Lrg;Lrg;)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, Block block, int int2, int int3, int int4, LivingEntity livingEntity) - Mappings:
Namespace Name Mixin selector official aLabm;a(Labo;Lafm;Laht;IIILrg;)Zintermediary method_3356Lnet/minecraft/class_1069;method_3356(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_197;IIILnet/minecraft/class_1699;)Znamed method_3356Lnet/minecraft/item/Item;method_3356(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/block/Block;IIILnet/minecraft/entity/LivingEntity;)Z
-
isEffectiveOn
- Mappings:
Namespace Name Mixin selector official bLabm;b(Laht;)Zintermediary method_3346Lnet/minecraft/class_1069;method_3346(Lnet/minecraft/class_197;)Znamed isEffectiveOnLnet/minecraft/item/Item;isEffectiveOn(Lnet/minecraft/block/Block;)Z
-
canUseOnEntity
- Mappings:
Namespace Name Mixin selector official aLabm;a(Labo;Lxk;Lrg;)Zintermediary method_3353Lnet/minecraft/class_1069;method_3353(Lnet/minecraft/class_1071;Lnet/minecraft/class_988;Lnet/minecraft/class_1699;)Znamed canUseOnEntityLnet/minecraft/item/Item;canUseOnEntity(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/entity/LivingEntity;)Z
-
setHandheld
Sets the item to look as handheld.- Returns:
- The current Item
- Mappings:
Namespace Name Mixin selector official qLabm;q()Labm;intermediary method_3389Lnet/minecraft/class_1069;method_3389()Lnet/minecraft/class_1069;named setHandheldLnet/minecraft/item/Item;setHandheld()Lnet/minecraft/item/Item;
-
isHandheld
Returns whether the item is supposed to look as handheld.- Mappings:
Namespace Name Mixin selector official fLabm;f()Zintermediary method_3372Lnet/minecraft/class_1069;method_3372()Znamed isHandheldLnet/minecraft/item/Item;isHandheld()Z
-
shouldRotate
- Mappings:
Namespace Name Mixin selector official gLabm;g()Zintermediary method_3390Lnet/minecraft/class_1069;method_3390()Znamed shouldRotateLnet/minecraft/item/Item;shouldRotate()Z
-
setTranslationKey
Sets the current item's translation key.- Parameters:
translationKey- Translation key- Returns:
- The current Item
- Mappings:
Namespace Name Mixin selector official cLabm;c(Ljava/lang/String;)Labm;intermediary method_6365Lnet/minecraft/class_1069;method_6365(Ljava/lang/String;)Lnet/minecraft/class_1069;named setTranslationKeyLnet/minecraft/item/Item;setTranslationKey(Ljava/lang/String;)Lnet/minecraft/item/Item;
-
getItemstackTranslatedName
Returns the translated name of an ItemStack- Parameters:
stack- The ItemStack- Returns:
- Translated name
- See Also:
- Mappings:
Namespace Name Mixin selector official kLabm;k(Labo;)Ljava/lang/String;intermediary method_3379Lnet/minecraft/class_1069;method_3379(Lnet/minecraft/class_1071;)Ljava/lang/String;named getItemstackTranslatedNameLnet/minecraft/item/Item;getItemstackTranslatedName(Lnet/minecraft/item/ItemStack;)Ljava/lang/String;
-
getTranslationKey
Returns the translation key of the current Item- Returns:
- Translation key
- Mappings:
Namespace Name Mixin selector official aLabm;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 aLabm;a(Labo;)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;
-
setRecipeRemainder
Sets the item's recipe remainder- Returns:
- The current Item
- Mappings:
Namespace Name Mixin selector official cLabm;c(Labm;)Labm;intermediary method_3349Lnet/minecraft/class_1069;method_3349(Lnet/minecraft/class_1069;)Lnet/minecraft/class_1069;named setRecipeRemainderLnet/minecraft/item/Item;setRecipeRemainder(Lnet/minecraft/item/Item;)Lnet/minecraft/item/Item;
-
method_3380
- Mappings:
Namespace Name Mixin selector official lLabm;l(Labo;)Zintermediary method_3380Lnet/minecraft/class_1069;method_3380(Lnet/minecraft/class_1071;)Znamed method_3380Lnet/minecraft/item/Item;method_3380(Lnet/minecraft/item/ItemStack;)Z
-
shouldSyncNbtToClient
public boolean shouldSyncNbtToClient()- Mappings:
Namespace Name Mixin selector official sLabm;s()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 tLabm;t()Labm;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 uLabm;u()Zintermediary method_3393Lnet/minecraft/class_1069;method_3393()Znamed isFoodLnet/minecraft/item/Item;isFood()Z
-
getDisplayColor
- Mappings:
Namespace Name Mixin selector official aLabm;a(Labo;I)Iintermediary method_3344Lnet/minecraft/class_1069;method_3344(Lnet/minecraft/class_1071;I)Inamed getDisplayColorLnet/minecraft/item/Item;getDisplayColor(Lnet/minecraft/item/ItemStack;I)I
-
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 aLabm;a(Labo;Lafm;Lqm;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 dLabm;d(Labo;Lafm;Lxk;)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 hLabm;h()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 dLabm;d(Labo;)Lact;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 d_Labm;d_(Labo;)Iintermediary method_3350Lnet/minecraft/class_1069;method_3350(Lnet/minecraft/class_1071;)Inamed getMaxUseTimeLnet/minecraft/item/Item;getMaxUseTime(Lnet/minecraft/item/ItemStack;)I
-
onUseStopped
- Mappings:
Namespace Name Mixin selector official aLabm;a(Labo;Lafm;Lxk;I)Vintermediary method_3359Lnet/minecraft/class_1069;method_3359(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_988;I)Vnamed onUseStoppedLnet/minecraft/item/Item;onUseStopped(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;I)V
-
setStatusEffectString
Sets the status effect string for the current item. Used by glowstone, spider eye, sugar, etc.- Parameters:
statusEffectString- The status effect string- Returns:
- The current Item
- Mappings:
Namespace Name Mixin selector official eLabm;e(Ljava/lang/String;)Labm;intermediary method_3370Lnet/minecraft/class_1069;method_3370(Ljava/lang/String;)Lnet/minecraft/class_1069;named setStatusEffectStringLnet/minecraft/item/Item;setStatusEffectString(Ljava/lang/String;)Lnet/minecraft/item/Item;
-
getStatusEffectString
Returns the status effect string for the current item.- Returns:
- The status effect string
- Mappings:
Namespace Name Mixin selector official iLabm;i(Labo;)Ljava/lang/String;intermediary method_6367Lnet/minecraft/class_1069;method_6367(Lnet/minecraft/class_1071;)Ljava/lang/String;named getStatusEffectStringLnet/minecraft/item/Item;getStatusEffectString(Lnet/minecraft/item/ItemStack;)Ljava/lang/String;
-
hasStatusEffectString
Returns whether the current item has a status effect string- Returns:
- Whether the current item has a status effect string
- Mappings:
Namespace Name Mixin selector official mLabm;m(Labo;)Zintermediary method_6369Lnet/minecraft/class_1069;method_6369(Lnet/minecraft/class_1071;)Znamed hasStatusEffectStringLnet/minecraft/item/Item;hasStatusEffectString(Lnet/minecraft/item/ItemStack;)Z
-
appendTooltip
@Environment(CLIENT) public void appendTooltip(ItemStack stack, PlayerEntity player, List lines, boolean advanced) - Mappings:
Namespace Name Mixin selector official aLabm;a(Labo;Lxk;Ljava/util/List;Z)Vintermediary method_3352Lnet/minecraft/class_1069;method_3352(Lnet/minecraft/class_1071;Lnet/minecraft/class_988;Ljava/util/List;Z)Vnamed appendTooltipLnet/minecraft/item/Item;appendTooltip(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/PlayerEntity;Ljava/util/List;Z)V
-
getDisplayName
- Mappings:
Namespace Name Mixin selector official nLabm;n(Labo;)Ljava/lang/String;intermediary method_3383Lnet/minecraft/class_1069;method_3383(Lnet/minecraft/class_1071;)Ljava/lang/String;named getDisplayNameLnet/minecraft/item/Item;getDisplayName(Lnet/minecraft/item/ItemStack;)Ljava/lang/String;
-
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 eLabm;e(Labo;)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 fLabm;f(Labo;)Lacb;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 e_Labm;e_(Labo;)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 aLabm;a(Lafm;Lxk;Z)Layh;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 -
method_3397
- Mappings:
Namespace Name Mixin selector official bLabm;b()Zintermediary method_3397Lnet/minecraft/class_1069;method_3397()Znamed method_3397Lnet/minecraft/item/Item;method_3397()Z
-
method_3369
- Mappings:
Namespace Name Mixin selector official aLabm;a(II)Lpr;intermediary method_3369Lnet/minecraft/class_1069;method_3369(II)Lnet/minecraft/class_1557;named method_3369Lnet/minecraft/item/Item;method_3369(II)Lnet/minecraft/client/Texture;
-
appendItemStacks
Registers an item's sub items- Parameters:
item- The Item instancegroup- The ItemGrouplist- The list of sub items- Mappings:
Namespace Name Mixin selector official aLabm;a(Labm;Laae;Ljava/util/List;)Vintermediary method_3345Lnet/minecraft/class_1069;method_3345(Lnet/minecraft/class_1069;Lnet/minecraft/class_1041;Ljava/util/List;)Vnamed appendItemStacksLnet/minecraft/item/Item;appendItemStacks(Lnet/minecraft/item/Item;Lnet/minecraft/item/itemgroup/ItemGroup;Ljava/util/List;)V
-
getItemGroup
Returns the itemgroup that the item is in- Mappings:
Namespace Name Mixin selector official n_Labm;n_()Laae;intermediary method_3398Lnet/minecraft/class_1069;method_3398()Lnet/minecraft/class_1041;named getItemGroupLnet/minecraft/item/Item;getItemGroup()Lnet/minecraft/item/itemgroup/ItemGroup;
-
setItemGroup
Sets the itemgroup that the current item should be in- Parameters:
group- The ItemGroup- Returns:
- The current Item
- Mappings:
Namespace Name Mixin selector official aLabm;a(Laae;)Labm;intermediary method_3348Lnet/minecraft/class_1069;method_3348(Lnet/minecraft/class_1041;)Lnet/minecraft/class_1069;named setItemGroupLnet/minecraft/item/Item;setItemGroup(Lnet/minecraft/item/itemgroup/ItemGroup;)Lnet/minecraft/item/Item;
-
hasSubTypes
public boolean hasSubTypes()- Mappings:
Namespace Name Mixin selector official vLabm;v()Zintermediary method_4616Lnet/minecraft/class_1069;method_4616()Znamed hasSubTypesLnet/minecraft/item/Item;hasSubTypes()Z
-
canRepair
Returns whether the item can be repaired via an anvil or crafting table.- Mappings:
Namespace Name Mixin selector official aLabm;a(Labo;Labo;)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_5462
- Mappings:
Namespace Name Mixin selector official aLabm;a(Lps;)Vintermediary method_5462Lnet/minecraft/class_1069;method_5462(Lnet/minecraft/class_1558;)Vnamed method_5462Lnet/minecraft/item/Item;method_5462(Lnet/minecraft/client/TextureRegistry;)V
-
getAttributeModifierMap
Returns a map containing entity attributes that are modified by the item- Mappings:
Namespace Name Mixin selector official kLabm;k()Lcom/google/common/collect/Multimap;intermediary method_6326Lnet/minecraft/class_1069;method_6326()Lcom/google/common/collect/Multimap;named getAttributeModifierMapLnet/minecraft/item/Item;getAttributeModifierMap()Lcom/google/common/collect/Multimap;
-
getFromId
Returns an Item from its name or its numeric Id as a String- Returns:
- Item
- Mappings:
Namespace Name Mixin selector official fLabm;f(Ljava/lang/String;)Labm;intermediary method_6325Lnet/minecraft/class_1069;method_6325(Ljava/lang/String;)Lnet/minecraft/class_1069;named getFromIdLnet/minecraft/item/Item;getFromId(Ljava/lang/String;)Lnet/minecraft/item/Item;
-
method_6324
- Mappings:
Namespace Name Mixin selector official wLabm;w()Ljava/lang/String;intermediary method_6324Lnet/minecraft/class_1069;method_6324()Ljava/lang/String;named method_6324Lnet/minecraft/item/Item;method_6324()Ljava/lang/String;
-