Class Item
- All Implemented Interfaces:
ItemConvertible
- Direct Known Subclasses:
AirBlockItem
,ArmorItem
,ArmorStandItem
,ArrowItem
,BannerPatternItem
,BlockItem
,BoatItem
,BoneMealItem
,BookItem
,BucketItem
,BundleItem
,ChorusFruitItem
,CompassItem
,DebugStickItem
,DecorationItem
,DyeItem
,EggItem
,ElytraItem
,EnchantedBookItem
,EnchantedGoldenAppleItem
,EndCrystalItem
,EnderEyeItem
,EnderPearlItem
,ExperienceBottleItem
,FireChargeItem
,FireworkChargeItem
,FireworkItem
,FishingRodItem
,FlintAndSteelItem
,GlassBottleItem
,HoneyBottleItem
,HorseArmorItem
,KnowledgeBookItem
,LeadItem
,MilkBucketItem
,MinecartItem
,MushroomStewItem
,MusicDiscItem
,NameTagItem
,NetherStarItem
,NetworkSyncedItem
,OnAStickItem
,PotionItem
,RangedWeaponItem
,SaddleItem
,ShearsItem
,ShieldItem
,SnowballItem
,SpawnEggItem
,SpyglassItem
,SuspiciousStewItem
,ToolItem
,TridentItem
,WritableBookItem
,WrittenBookItem
public class Item extends Object implements ItemConvertible
- Mappings:
Namespace Name official bnr
intermediary net/minecraft/class_1792
named net/minecraft/item/Item
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Item.Settings
-
Field Summary
Fields Modifier and Type Field Description protected static UUID
ATTACK_DAMAGE_MODIFIER_ID
protected static UUID
ATTACK_SPEED_MODIFIER_ID
static Map<Block,Item>
BLOCK_ITEMS
private boolean
fireproof
private FoodComponent
foodComponent
protected ItemGroup
group
private static Logger
LOGGER
private int
maxCount
private int
maxDamage
private Rarity
rarity
private Item
recipeRemainder
private String
translationKey
-
Constructor Summary
Constructors Constructor Description Item(Item.Settings settings)
-
Method Summary
Modifier and Type Method Description void
appendStacks(ItemGroup group, DefaultedList<ItemStack> stacks)
void
appendTooltip(ItemStack stack, World world, List<Text> tooltip, TooltipContext context)
Item
asItem()
Gets this object in its item form.static Item
byRawId(int id)
boolean
canMine(BlockState state, World world, BlockPos pos, PlayerEntity miner)
Checks if a player can break a block while holding the item.boolean
canRepair(ItemStack stack, ItemStack ingredient)
boolean
damage(DamageSource source)
ItemStack
finishUsing(ItemStack stack, World world, LivingEntity user)
static Item
fromBlock(Block block)
Deprecated.Multimap<EntityAttribute,EntityAttributeModifier>
getAttributeModifiers(EquipmentSlot slot)
ItemStack
getDefaultStack()
SoundEvent
getDrinkSound()
SoundEvent
getEatSound()
int
getEnchantability()
Gets the enchantability of an item.SoundEvent
getEquipSound()
FoodComponent
getFoodComponent()
ItemGroup
getGroup()
int
getItemBarColor(ItemStack stack)
int
getItemBarStep(ItemStack stack)
int
getMaxCount()
int
getMaxDamage()
int
getMaxUseTime(ItemStack stack)
float
getMiningSpeedMultiplier(ItemStack stack, BlockState state)
Text
getName()
Text
getName(ItemStack stack)
protected String
getOrCreateTranslationKey()
Rarity
getRarity(ItemStack stack)
static int
getRawId(Item item)
Item
getRecipeRemainder()
Gets the remainder item that should be left behind when this item is used as a crafting ingredient.Optional<TooltipData>
getTooltipData(ItemStack stack)
String
getTranslationKey()
Gets the translation key of this item.String
getTranslationKey(ItemStack stack)
Gets the translation key of this item using the provided item stack for context.UseAction
getUseAction(ItemStack stack)
boolean
hasGlint(ItemStack stack)
Checks if the glint effect should be applied when the item is rendered.boolean
hasRecipeRemainder()
Checks if this item has a remainder item that is left behind when used as a crafting ingredient.boolean
hasStoredInventory()
void
inventoryTick(ItemStack stack, World world, Entity entity, int slot, boolean selected)
boolean
isDamageable()
boolean
isEnchantable(ItemStack stack)
boolean
isFireproof()
boolean
isFood()
Checks if this item is food and therefore is edible.protected boolean
isIn(ItemGroup group)
Checks whether this item should appear in a specified item group.boolean
isItemBarVisible(ItemStack stack)
boolean
isNetworkSynced()
boolean
isSuitableFor(BlockState state)
Determines whether this item can be used as a suitable tool for mining the specified block.boolean
isUsedOnRelease(ItemStack stack)
boolean
onClicked(ItemStack stack, ItemStack otherStack, Slot slot, ClickType clickType, PlayerInventory playerInventory)
void
onCraft(ItemStack stack, World world, PlayerEntity player)
Called when a player acquires the item by crafting, smelting, smithing, etc.void
onItemEntityDestroyed(ItemEntity entity)
boolean
onStackClicked(ItemStack stack, Slot slot, ClickType clickType, PlayerInventory playerInventory)
void
onStoppedUsing(ItemStack stack, World world, LivingEntity user, int remainingUseTicks)
boolean
postHit(ItemStack stack, LivingEntity target, LivingEntity attacker)
boolean
postMine(ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner)
boolean
postProcessTag(CompoundTag tag)
protected static BlockHitResult
raycast(World world, PlayerEntity player, RaycastContext.FluidHandling fluidHandling)
boolean
shouldSyncTagToClient()
Checks if an item should have its NBT data stored inItemStack.tag
sent to the client.String
toString()
void
usageTick(World world, LivingEntity user, ItemStack stack, int remainingUseTicks)
TypedActionResult<ItemStack>
use(World world, PlayerEntity user, Hand hand)
Called when an item is used by a player.ActionResult
useOnBlock(ItemUsageContext context)
Called when an item is used on a block.ActionResult
useOnEntity(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand)
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official a
Lbnr;a:Lorg/apache/logging/log4j/Logger;
intermediary field_27017
Lnet/minecraft/class_1792;field_27017:Lorg/apache/logging/log4j/Logger;
named LOGGER
Lnet/minecraft/item/Item;LOGGER:Lorg/apache/logging/log4j/Logger;
-
BLOCK_ITEMS
- Mappings:
Namespace Name Mixin selector official e
Lbnr;e:Ljava/util/Map;
intermediary field_8003
Lnet/minecraft/class_1792;field_8003:Ljava/util/Map;
named BLOCK_ITEMS
Lnet/minecraft/item/Item;BLOCK_ITEMS:Ljava/util/Map;
-
ATTACK_DAMAGE_MODIFIER_ID
- Mappings:
Namespace Name Mixin selector official f
Lbnr;f:Ljava/util/UUID;
intermediary field_8006
Lnet/minecraft/class_1792;field_8006:Ljava/util/UUID;
named ATTACK_DAMAGE_MODIFIER_ID
Lnet/minecraft/item/Item;ATTACK_DAMAGE_MODIFIER_ID:Ljava/util/UUID;
-
ATTACK_SPEED_MODIFIER_ID
- Mappings:
Namespace Name Mixin selector official g
Lbnr;g:Ljava/util/UUID;
intermediary field_8001
Lnet/minecraft/class_1792;field_8001:Ljava/util/UUID;
named ATTACK_SPEED_MODIFIER_ID
Lnet/minecraft/item/Item;ATTACK_SPEED_MODIFIER_ID:Ljava/util/UUID;
-
group
- Mappings:
Namespace Name Mixin selector official h
Lbnr;h:Lbmm;
intermediary field_8004
Lnet/minecraft/class_1792;field_8004:Lnet/minecraft/class_1761;
named group
Lnet/minecraft/item/Item;group:Lnet/minecraft/item/ItemGroup;
-
rarity
- Mappings:
Namespace Name Mixin selector official b
Lbnr;b:Lbok;
intermediary field_8009
Lnet/minecraft/class_1792;field_8009:Lnet/minecraft/class_1814;
named rarity
Lnet/minecraft/item/Item;rarity:Lnet/minecraft/util/Rarity;
-
maxCount
private final int maxCount- Mappings:
Namespace Name Mixin selector official c
Lbnr;c:I
intermediary field_8013
Lnet/minecraft/class_1792;field_8013:I
named maxCount
Lnet/minecraft/item/Item;maxCount:I
-
maxDamage
private final int maxDamage- Mappings:
Namespace Name Mixin selector official d
Lbnr;d:I
intermediary field_8012
Lnet/minecraft/class_1792;field_8012:I
named maxDamage
Lnet/minecraft/item/Item;maxDamage:I
-
fireproof
private final boolean fireproof- Mappings:
Namespace Name Mixin selector official i
Lbnr;i:Z
intermediary field_21979
Lnet/minecraft/class_1792;field_21979:Z
named fireproof
Lnet/minecraft/item/Item;fireproof:Z
-
recipeRemainder
- Mappings:
Namespace Name Mixin selector official j
Lbnr;j:Lbnr;
intermediary field_8008
Lnet/minecraft/class_1792;field_8008:Lnet/minecraft/class_1792;
named recipeRemainder
Lnet/minecraft/item/Item;recipeRemainder:Lnet/minecraft/item/Item;
-
translationKey
- Mappings:
Namespace Name Mixin selector official k
Lbnr;k:Ljava/lang/String;
intermediary field_8014
Lnet/minecraft/class_1792;field_8014:Ljava/lang/String;
named translationKey
Lnet/minecraft/item/Item;translationKey:Ljava/lang/String;
-
foodComponent
- Mappings:
Namespace Name Mixin selector official l
Lbnr;l:Lbjo;
intermediary field_18672
Lnet/minecraft/class_1792;field_18672:Lnet/minecraft/class_4174;
named foodComponent
Lnet/minecraft/item/Item;foodComponent:Lnet/minecraft/item/FoodComponent;
-
-
Constructor Details
-
Item
- Mappings:
Namespace Name Mixin selector official <init>
Lbnr;<init>(Lbnr$a;)V
intermediary <init>
Lnet/minecraft/class_1792;<init>(Lnet/minecraft/class_1792$class_1793;)V
named <init>
Lnet/minecraft/item/Item;<init>(Lnet/minecraft/item/Item$Settings;)V
-
-
Method Details
-
getRawId
- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbnr;)I
intermediary method_7880
Lnet/minecraft/class_1792;method_7880(Lnet/minecraft/class_1792;)I
named getRawId
Lnet/minecraft/item/Item;getRawId(Lnet/minecraft/item/Item;)I
-
byRawId
- Mappings:
Namespace Name Mixin selector official b
Lbnr;b(I)Lbnr;
intermediary method_7875
Lnet/minecraft/class_1792;method_7875(I)Lnet/minecraft/class_1792;
named byRawId
Lnet/minecraft/item/Item;byRawId(I)Lnet/minecraft/item/Item;
-
fromBlock
Deprecated.Please useBlock.asItem()
- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbwu;)Lbnr;
intermediary method_7867
Lnet/minecraft/class_1792;method_7867(Lnet/minecraft/class_2248;)Lnet/minecraft/class_1792;
named fromBlock
Lnet/minecraft/item/Item;fromBlock(Lnet/minecraft/block/Block;)Lnet/minecraft/item/Item;
-
usageTick
- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbtv;Lari;Lbnv;I)V
intermediary method_7852
Lnet/minecraft/class_1792;method_7852(Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;I)V
named usageTick
Lnet/minecraft/item/Item;usageTick(Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;I)V
-
onItemEntityDestroyed
- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbek;)V
intermediary method_33261
Lnet/minecraft/class_1792;method_33261(Lnet/minecraft/class_1542;)V
named onItemEntityDestroyed
Lnet/minecraft/item/Item;onItemEntityDestroyed(Lnet/minecraft/entity/ItemEntity;)V
-
postProcessTag
- Mappings:
Namespace Name Mixin selector official b
Lbnr;b(Lmq;)Z
intermediary method_7860
Lnet/minecraft/class_1792;method_7860(Lnet/minecraft/class_2487;)Z
named postProcessTag
Lnet/minecraft/item/Item;postProcessTag(Lnet/minecraft/nbt/CompoundTag;)Z
-
canMine
Checks if a player can break a block while holding the item.- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lcht;Lbtv;Lfx;Lbhl;)Z
intermediary method_7885
Lnet/minecraft/class_1792;method_7885(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;)Z
named canMine
Lnet/minecraft/item/Item;canMine(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;)Z
-
asItem
Gets this object in its item form.- Specified by:
asItem
in interfaceItemConvertible
- Mappings:
Namespace Name Mixin selector official k
Lbtu;k()Lbnr;
intermediary method_8389
Lnet/minecraft/class_1935;method_8389()Lnet/minecraft/class_1792;
named asItem
Lnet/minecraft/item/ItemConvertible;asItem()Lnet/minecraft/item/Item;
-
useOnBlock
Called when an item is used on a block.This method is called on both the logical client and logical server, so take caution when using this method. The logical side can be checked using
context.getWorld().isClient()
.- Parameters:
context
- the usage context- Returns:
- an action result that specifies if using the item on a block was successful.
- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbpx;)Lapq;
intermediary method_7884
Lnet/minecraft/class_1792;method_7884(Lnet/minecraft/class_1838;)Lnet/minecraft/class_1269;
named useOnBlock
Lnet/minecraft/item/Item;useOnBlock(Lnet/minecraft/item/ItemUsageContext;)Lnet/minecraft/util/ActionResult;
-
getMiningSpeedMultiplier
- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbnv;Lcht;)F
intermediary method_7865
Lnet/minecraft/class_1792;method_7865(Lnet/minecraft/class_1799;Lnet/minecraft/class_2680;)F
named getMiningSpeedMultiplier
Lnet/minecraft/item/Item;getMiningSpeedMultiplier(Lnet/minecraft/item/ItemStack;Lnet/minecraft/block/BlockState;)F
-
use
Called when an item is used by a player. The use action, by default, is bound to the right mouse button.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
world.isClient()
.- Parameters:
world
- the world the item was used inuser
- the player who used the itemhand
- the hand used- Returns:
- a typed action result that specifies whether using the item was successful. The action result contains the new item stack that the player's hand will be set to.
- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbtv;Lbhl;Lapp;)Lapr;
intermediary method_7836
Lnet/minecraft/class_1792;method_7836(Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1271;
named use
Lnet/minecraft/item/Item;use(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/TypedActionResult;
-
finishUsing
- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbnv;Lbtv;Lari;)Lbnv;
intermediary method_7861
Lnet/minecraft/class_1792;method_7861(Lnet/minecraft/class_1799;Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;)Lnet/minecraft/class_1799;
named finishUsing
Lnet/minecraft/item/Item;finishUsing(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;)Lnet/minecraft/item/ItemStack;
-
getMaxCount
public final int getMaxCount()- Mappings:
Namespace Name Mixin selector official l
Lbnr;l()I
intermediary method_7882
Lnet/minecraft/class_1792;method_7882()I
named getMaxCount
Lnet/minecraft/item/Item;getMaxCount()I
-
getMaxDamage
public final int getMaxDamage()- Mappings:
Namespace Name Mixin selector official m
Lbnr;m()I
intermediary method_7841
Lnet/minecraft/class_1792;method_7841()I
named getMaxDamage
Lnet/minecraft/item/Item;getMaxDamage()I
-
isDamageable
public boolean isDamageable()- Mappings:
Namespace Name Mixin selector official n
Lbnr;n()Z
intermediary method_7846
Lnet/minecraft/class_1792;method_7846()Z
named isDamageable
Lnet/minecraft/item/Item;isDamageable()Z
-
isItemBarVisible
- Mappings:
Namespace Name Mixin selector official e
Lbnr;e(Lbnv;)Z
intermediary method_31567
Lnet/minecraft/class_1792;method_31567(Lnet/minecraft/class_1799;)Z
named isItemBarVisible
Lnet/minecraft/item/Item;isItemBarVisible(Lnet/minecraft/item/ItemStack;)Z
-
getItemBarStep
- Mappings:
Namespace Name Mixin selector official f
Lbnr;f(Lbnv;)I
intermediary method_31569
Lnet/minecraft/class_1792;method_31569(Lnet/minecraft/class_1799;)I
named getItemBarStep
Lnet/minecraft/item/Item;getItemBarStep(Lnet/minecraft/item/ItemStack;)I
-
getItemBarColor
- Mappings:
Namespace Name Mixin selector official g
Lbnr;g(Lbnv;)I
intermediary method_31571
Lnet/minecraft/class_1792;method_31571(Lnet/minecraft/class_1799;)I
named getItemBarColor
Lnet/minecraft/item/Item;getItemBarColor(Lnet/minecraft/item/ItemStack;)I
-
onStackClicked
public boolean onStackClicked(ItemStack stack, Slot slot, ClickType clickType, PlayerInventory playerInventory)- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbnv;Lblh;Lbjz;Lbhk;)Z
intermediary method_31565
Lnet/minecraft/class_1792;method_31565(Lnet/minecraft/class_1799;Lnet/minecraft/class_1735;Lnet/minecraft/class_5536;Lnet/minecraft/class_1661;)Z
named onStackClicked
Lnet/minecraft/item/Item;onStackClicked(Lnet/minecraft/item/ItemStack;Lnet/minecraft/screen/slot/Slot;Lnet/minecraft/util/ClickType;Lnet/minecraft/entity/player/PlayerInventory;)Z
-
onClicked
public boolean onClicked(ItemStack stack, ItemStack otherStack, Slot slot, ClickType clickType, PlayerInventory playerInventory)- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbnv;Lbnv;Lblh;Lbjz;Lbhk;)Z
intermediary method_31566
Lnet/minecraft/class_1792;method_31566(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;Lnet/minecraft/class_1735;Lnet/minecraft/class_5536;Lnet/minecraft/class_1661;)Z
named onClicked
Lnet/minecraft/item/Item;onClicked(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;Lnet/minecraft/screen/slot/Slot;Lnet/minecraft/util/ClickType;Lnet/minecraft/entity/player/PlayerInventory;)Z
-
postHit
- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbnv;Lari;Lari;)Z
intermediary method_7873
Lnet/minecraft/class_1792;method_7873(Lnet/minecraft/class_1799;Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;)Z
named postHit
Lnet/minecraft/item/Item;postHit(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;)Z
-
postMine
public boolean postMine(ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner)- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbnv;Lbtv;Lcht;Lfx;Lari;)Z
intermediary method_7879
Lnet/minecraft/class_1792;method_7879(Lnet/minecraft/class_1799;Lnet/minecraft/class_1937;Lnet/minecraft/class_2680;Lnet/minecraft/class_2338;Lnet/minecraft/class_1309;)Z
named postMine
Lnet/minecraft/item/Item;postMine(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/LivingEntity;)Z
-
isSuitableFor
Determines whether this item can be used as a suitable tool for mining the specified block. Depending on block implementation, when combined together, the correct item and block may achieve a better mining speed and yield drops that would not be obtained when mining otherwise.Note that this is not the only way to achieve "effectiveness" when mining. Other items, such as shears on string, may use their own logic and calls to this method might not return a value consistent to this rule for those items.
- Mappings:
Namespace Name Mixin selector official b
Lbnr;b(Lcht;)Z
intermediary method_7856
Lnet/minecraft/class_1792;method_7856(Lnet/minecraft/class_2680;)Z
named isSuitableFor
Lnet/minecraft/item/Item;isSuitableFor(Lnet/minecraft/block/BlockState;)Z
-
useOnEntity
public ActionResult useOnEntity(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand)- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbnv;Lbhl;Lari;Lapp;)Lapq;
intermediary method_7847
Lnet/minecraft/class_1792;method_7847(Lnet/minecraft/class_1799;Lnet/minecraft/class_1657;Lnet/minecraft/class_1309;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1269;
named useOnEntity
Lnet/minecraft/item/Item;useOnEntity(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/ActionResult;
-
getName
- Mappings:
Namespace Name Mixin selector official o
Lbnr;o()Loi;
intermediary method_7848
Lnet/minecraft/class_1792;method_7848()Lnet/minecraft/class_2561;
named getName
Lnet/minecraft/item/Item;getName()Lnet/minecraft/text/Text;
-
toString
-
getOrCreateTranslationKey
- Mappings:
Namespace Name Mixin selector official p
Lbnr;p()Ljava/lang/String;
intermediary method_7869
Lnet/minecraft/class_1792;method_7869()Ljava/lang/String;
named getOrCreateTranslationKey
Lnet/minecraft/item/Item;getOrCreateTranslationKey()Ljava/lang/String;
-
getTranslationKey
Gets the translation key of this item.- Mappings:
Namespace Name Mixin selector official a
Lbnr;a()Ljava/lang/String;
intermediary method_7876
Lnet/minecraft/class_1792;method_7876()Ljava/lang/String;
named getTranslationKey
Lnet/minecraft/item/Item;getTranslationKey()Ljava/lang/String;
-
getTranslationKey
Gets the translation key of this item using the provided item stack for context.- Mappings:
Namespace Name Mixin selector official j
Lbnr;j(Lbnv;)Ljava/lang/String;
intermediary method_7866
Lnet/minecraft/class_1792;method_7866(Lnet/minecraft/class_1799;)Ljava/lang/String;
named getTranslationKey
Lnet/minecraft/item/Item;getTranslationKey(Lnet/minecraft/item/ItemStack;)Ljava/lang/String;
-
shouldSyncTagToClient
public boolean shouldSyncTagToClient()Checks if an item should have its NBT data stored inItemStack.tag
sent to the client.If an item is damageable, this method is ignored and data is always synced to client.
- Mappings:
Namespace Name Mixin selector official q
Lbnr;q()Z
intermediary method_7887
Lnet/minecraft/class_1792;method_7887()Z
named shouldSyncTagToClient
Lnet/minecraft/item/Item;shouldSyncTagToClient()Z
-
getRecipeRemainder
Gets the remainder item that should be left behind when this item is used as a crafting ingredient.- Mappings:
Namespace Name Mixin selector official r
Lbnr;r()Lbnr;
intermediary method_7858
Lnet/minecraft/class_1792;method_7858()Lnet/minecraft/class_1792;
named getRecipeRemainder
Lnet/minecraft/item/Item;getRecipeRemainder()Lnet/minecraft/item/Item;
-
hasRecipeRemainder
public boolean hasRecipeRemainder()Checks if this item has a remainder item that is left behind when used as a crafting ingredient.- Mappings:
Namespace Name Mixin selector official s
Lbnr;s()Z
intermediary method_7857
Lnet/minecraft/class_1792;method_7857()Z
named hasRecipeRemainder
Lnet/minecraft/item/Item;hasRecipeRemainder()Z
-
inventoryTick
- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbnv;Lbtv;Laqv;IZ)V
intermediary method_7888
Lnet/minecraft/class_1792;method_7888(Lnet/minecraft/class_1799;Lnet/minecraft/class_1937;Lnet/minecraft/class_1297;IZ)V
named inventoryTick
Lnet/minecraft/item/Item;inventoryTick(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/Entity;IZ)V
-
onCraft
Called when a player acquires the item by crafting, smelting, smithing, etc.- Mappings:
Namespace Name Mixin selector official b
Lbnr;b(Lbnv;Lbtv;Lbhl;)V
intermediary method_7843
Lnet/minecraft/class_1792;method_7843(Lnet/minecraft/class_1799;Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;)V
named onCraft
Lnet/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 ae_
Lbnr;ae_()Z
intermediary method_16698
Lnet/minecraft/class_1792;method_16698()Z
named isNetworkSynced
Lnet/minecraft/item/Item;isNetworkSynced()Z
-
getUseAction
- Mappings:
Namespace Name Mixin selector official d_
Lbnr;d_(Lbnv;)Lbpk;
intermediary method_7853
Lnet/minecraft/class_1792;method_7853(Lnet/minecraft/class_1799;)Lnet/minecraft/class_1839;
named getUseAction
Lnet/minecraft/item/Item;getUseAction(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/UseAction;
-
getMaxUseTime
- Mappings:
Namespace Name Mixin selector official e_
Lbnr;e_(Lbnv;)I
intermediary method_7881
Lnet/minecraft/class_1792;method_7881(Lnet/minecraft/class_1799;)I
named getMaxUseTime
Lnet/minecraft/item/Item;getMaxUseTime(Lnet/minecraft/item/ItemStack;)I
-
onStoppedUsing
- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbnv;Lbtv;Lari;I)V
intermediary method_7840
Lnet/minecraft/class_1792;method_7840(Lnet/minecraft/class_1799;Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;I)V
named onStoppedUsing
Lnet/minecraft/item/Item;onStoppedUsing(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;I)V
-
appendTooltip
@Environment(CLIENT) public void appendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context)- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbnv;Lbtv;Ljava/util/List;Lbpi;)V
intermediary method_7851
Lnet/minecraft/class_1792;method_7851(Lnet/minecraft/class_1799;Lnet/minecraft/class_1937;Ljava/util/List;Lnet/minecraft/class_1836;)V
named appendTooltip
Lnet/minecraft/item/Item;appendTooltip(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Ljava/util/List;Lnet/minecraft/client/item/TooltipContext;)V
-
getTooltipData
- Mappings:
Namespace Name Mixin selector official h
Lbnr;h(Lbnv;)Ljava/util/Optional;
intermediary method_32346
Lnet/minecraft/class_1792;method_32346(Lnet/minecraft/class_1799;)Ljava/util/Optional;
named getTooltipData
Lnet/minecraft/item/Item;getTooltipData(Lnet/minecraft/item/ItemStack;)Ljava/util/Optional;
-
getName
- Mappings:
Namespace Name Mixin selector official m
Lbnr;m(Lbnv;)Loi;
intermediary method_7864
Lnet/minecraft/class_1792;method_7864(Lnet/minecraft/class_1799;)Lnet/minecraft/class_2561;
named getName
Lnet/minecraft/item/Item;getName(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/text/Text;
-
hasGlint
Checks if the glint effect should be applied when the item is rendered.By default, returns true if the item has enchantments.
- Mappings:
Namespace Name Mixin selector official i
Lbnr;i(Lbnv;)Z
intermediary method_7886
Lnet/minecraft/class_1792;method_7886(Lnet/minecraft/class_1799;)Z
named hasGlint
Lnet/minecraft/item/Item;hasGlint(Lnet/minecraft/item/ItemStack;)Z
-
getRarity
- Mappings:
Namespace Name Mixin selector official n
Lbnr;n(Lbnv;)Lbok;
intermediary method_7862
Lnet/minecraft/class_1792;method_7862(Lnet/minecraft/class_1799;)Lnet/minecraft/class_1814;
named getRarity
Lnet/minecraft/item/Item;getRarity(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/Rarity;
-
isEnchantable
- Mappings:
Namespace Name Mixin selector official f_
Lbnr;f_(Lbnv;)Z
intermediary method_7870
Lnet/minecraft/class_1792;method_7870(Lnet/minecraft/class_1799;)Z
named isEnchantable
Lnet/minecraft/item/Item;isEnchantable(Lnet/minecraft/item/ItemStack;)Z
-
raycast
protected static BlockHitResult raycast(World world, PlayerEntity player, RaycastContext.FluidHandling fluidHandling)- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbtv;Lbhl;Lbtd$b;)Ldiq;
intermediary method_7872
Lnet/minecraft/class_1792;method_7872(Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_3959$class_242;)Lnet/minecraft/class_3965;
named raycast
Lnet/minecraft/item/Item;raycast(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/world/RaycastContext$FluidHandling;)Lnet/minecraft/util/hit/BlockHitResult;
-
getEnchantability
public int getEnchantability()Gets the enchantability of an item. This specifies the ability of an item to receive enchantments when enchanted using an enchanting table. As the value increases, the amount and level of enchantments applied increase.If the value of this method is 0, the item cannot be enchanted using an enchanting table.
- Mappings:
Namespace Name Mixin selector official c
Lbnr;c()I
intermediary method_7837
Lnet/minecraft/class_1792;method_7837()I
named getEnchantability
Lnet/minecraft/item/Item;getEnchantability()I
-
appendStacks
- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbmm;Lgj;)V
intermediary method_7850
Lnet/minecraft/class_1792;method_7850(Lnet/minecraft/class_1761;Lnet/minecraft/class_2371;)V
named appendStacks
Lnet/minecraft/item/Item;appendStacks(Lnet/minecraft/item/ItemGroup;Lnet/minecraft/util/collection/DefaultedList;)V
-
isIn
Checks whether this item should appear in a specified item group.- Returns:
- true if the item is in the specified item group or the item group is
ItemGroup.SEARCH
. - Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbmm;)Z
intermediary method_7877
Lnet/minecraft/class_1792;method_7877(Lnet/minecraft/class_1761;)Z
named isIn
Lnet/minecraft/item/Item;isIn(Lnet/minecraft/item/ItemGroup;)Z
-
getGroup
- Mappings:
Namespace Name Mixin selector official t
Lbnr;t()Lbmm;
intermediary method_7859
Lnet/minecraft/class_1792;method_7859()Lnet/minecraft/class_1761;
named getGroup
Lnet/minecraft/item/Item;getGroup()Lnet/minecraft/item/ItemGroup;
-
canRepair
- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lbnv;Lbnv;)Z
intermediary method_7878
Lnet/minecraft/class_1792;method_7878(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Z
named canRepair
Lnet/minecraft/item/Item;canRepair(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z
-
getAttributeModifiers
public Multimap<EntityAttribute,EntityAttributeModifier> getAttributeModifiers(EquipmentSlot slot)- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Lara;)Lcom/google/common/collect/Multimap;
intermediary method_7844
Lnet/minecraft/class_1792;method_7844(Lnet/minecraft/class_1304;)Lcom/google/common/collect/Multimap;
named getAttributeModifiers
Lnet/minecraft/item/Item;getAttributeModifiers(Lnet/minecraft/entity/EquipmentSlot;)Lcom/google/common/collect/Multimap;
-
isUsedOnRelease
- Mappings:
Namespace Name Mixin selector official l
Lbnr;l(Lbnv;)Z
intermediary method_7838
Lnet/minecraft/class_1792;method_7838(Lnet/minecraft/class_1799;)Z
named isUsedOnRelease
Lnet/minecraft/item/Item;isUsedOnRelease(Lnet/minecraft/item/ItemStack;)Z
-
getDefaultStack
- Mappings:
Namespace Name Mixin selector official ag_
Lbnr;ag_()Lbnv;
intermediary method_7854
Lnet/minecraft/class_1792;method_7854()Lnet/minecraft/class_1799;
named getDefaultStack
Lnet/minecraft/item/Item;getDefaultStack()Lnet/minecraft/item/ItemStack;
-
isFood
public boolean isFood()Checks if this item is food and therefore is edible.- Mappings:
Namespace Name Mixin selector official u
Lbnr;u()Z
intermediary method_19263
Lnet/minecraft/class_1792;method_19263()Z
named isFood
Lnet/minecraft/item/Item;isFood()Z
-
getFoodComponent
- Mappings:
Namespace Name Mixin selector official v
Lbnr;v()Lbjo;
intermediary method_19264
Lnet/minecraft/class_1792;method_19264()Lnet/minecraft/class_4174;
named getFoodComponent
Lnet/minecraft/item/Item;getFoodComponent()Lnet/minecraft/item/FoodComponent;
-
getDrinkSound
- Mappings:
Namespace Name Mixin selector official af_
Lbnr;af_()Laef;
intermediary method_21831
Lnet/minecraft/class_1792;method_21831()Lnet/minecraft/class_3414;
named getDrinkSound
Lnet/minecraft/item/Item;getDrinkSound()Lnet/minecraft/sound/SoundEvent;
-
getEatSound
- Mappings:
Namespace Name Mixin selector official h
Lbnr;h()Laef;
intermediary method_21830
Lnet/minecraft/class_1792;method_21830()Lnet/minecraft/class_3414;
named getEatSound
Lnet/minecraft/item/Item;getEatSound()Lnet/minecraft/sound/SoundEvent;
-
isFireproof
public boolean isFireproof()- Mappings:
Namespace Name Mixin selector official w
Lbnr;w()Z
intermediary method_24358
Lnet/minecraft/class_1792;method_24358()Z
named isFireproof
Lnet/minecraft/item/Item;isFireproof()Z
-
damage
- Mappings:
Namespace Name Mixin selector official a
Lbnr;a(Laqf;)Z
intermediary method_24357
Lnet/minecraft/class_1792;method_24357(Lnet/minecraft/class_1282;)Z
named damage
Lnet/minecraft/item/Item;damage(Lnet/minecraft/entity/damage/DamageSource;)Z
-
getEquipSound
- Mappings:
Namespace Name Mixin selector official g
Lbnr;g()Laef;
intermediary method_31570
Lnet/minecraft/class_1792;method_31570()Lnet/minecraft/class_3414;
named getEquipSound
Lnet/minecraft/item/Item;getEquipSound()Lnet/minecraft/sound/SoundEvent;
-
hasStoredInventory
public boolean hasStoredInventory()- Mappings:
Namespace Name Mixin selector official f
Lbnr;f()Z
intermediary method_31568
Lnet/minecraft/class_1792;method_31568()Z
named hasStoredInventory
Lnet/minecraft/item/Item;hasStoredInventory()Z
-
Block.asItem()