Class Item

java.lang.Object
net.minecraft.item.Item
Direct Known Subclasses:
ArmorItem, ArmorStandItem, BedItem, BlockItem, BoatItem, BookItem, BowItem, BucketItem, CarrotOnAStickItem, class_2680, ClockItem, CoalItem, CompassItem, DyeItem, EggItem, ElytraItem, EnchantedBookItem, EndCrystalItem, EnderEyeItem, EnderPearlItem, ExperienceBottleItem, FireChargeItem, FireworkChargeItem, FireworkItem, FishingRodItem, FlintAndSteelItem, FoodItem, GlassBottleItem, HoeItem, LeadItem, MilkBucketItem, MinecartItem, MusicDiscItem, NameTagItem, NetherStarItem, NetworkSyncedItem, PlaceableItem, PotionItem, RedstoneItem, SaddleItem, SeedItem, ShearsItem, ShieldItem, SignItem, SkullItem, SnowballItem, SpawnEggItem, SwordItem, ToolItem, WallHangableItem, WoodenDoorItem, WritableBookItem, WrittenBookItem

public class Item extends Object
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 ado
intermediary net/minecraft/class_1069
named net/minecraft/item/Item
  • Field Details

    • REGISTRY

      public static final SimpleRegistry<Identifier,Item> REGISTRY
      The Registry where all items get registered to.
      Mappings:
      Namespace Name Mixin selector
      official g Lado;g:Lcz;
      intermediary field_6973 Lnet/minecraft/class_1069;field_6973:Lnet/minecraft/class_1943;
      named REGISTRY Lnet/minecraft/item/Item;REGISTRY:Lnet/minecraft/util/registry/SimpleRegistry;
    • BLOCK_ITEMS

      private static final Map<Block,Item> BLOCK_ITEMS
      A map containing all BlockItems, with their corresponding Block and Item variants
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a:Ljava/util/Map;
      intermediary field_12183 Lnet/minecraft/class_1069;field_12183:Ljava/util/Map;
      named BLOCK_ITEMS Lnet/minecraft/item/Item;BLOCK_ITEMS:Ljava/util/Map;
    • GETTER_DAMAGED

      private static final ItemPropertyGetter GETTER_DAMAGED
      Mappings:
      Namespace Name Mixin selector
      official b Lado;b:Ladr;
      intermediary field_12299 Lnet/minecraft/class_1069;field_12299:Lnet/minecraft/class_2688;
      named GETTER_DAMAGED Lnet/minecraft/item/Item;GETTER_DAMAGED:Lnet/minecraft/item/ItemPropertyGetter;
    • GETTER_DAMAGE

      private static final ItemPropertyGetter GETTER_DAMAGE
      Mappings:
      Namespace Name Mixin selector
      official c Lado;c:Ladr;
      intermediary field_12300 Lnet/minecraft/class_1069;field_12300:Lnet/minecraft/class_2688;
      named GETTER_DAMAGE Lnet/minecraft/item/Item;GETTER_DAMAGE:Lnet/minecraft/item/ItemPropertyGetter;
    • GETTER_HAND

      private static final ItemPropertyGetter GETTER_HAND
      Mappings:
      Namespace Name Mixin selector
      official d Lado;d:Ladr;
      intermediary field_12301 Lnet/minecraft/class_1069;field_12301:Lnet/minecraft/class_2688;
      named GETTER_HAND Lnet/minecraft/item/Item;GETTER_HAND:Lnet/minecraft/item/ItemPropertyGetter;
    • GETTER_COOLDOWN

      private static final ItemPropertyGetter GETTER_COOLDOWN
      Mappings:
      Namespace Name Mixin selector
      official e Lado;e:Ladr;
      intermediary field_12302 Lnet/minecraft/class_1069;field_12302:Lnet/minecraft/class_2688;
      named GETTER_COOLDOWN Lnet/minecraft/item/Item;GETTER_COOLDOWN:Lnet/minecraft/item/ItemPropertyGetter;
    • ATTACK_DAMAGE_MODIFIER_UUID

      protected static final UUID ATTACK_DAMAGE_MODIFIER_UUID
      Mappings:
      Namespace Name Mixin selector
      official h Lado;h:Ljava/util/UUID;
      intermediary field_6947 Lnet/minecraft/class_1069;field_6947:Ljava/util/UUID;
      named ATTACK_DAMAGE_MODIFIER_UUID Lnet/minecraft/item/Item;ATTACK_DAMAGE_MODIFIER_UUID:Ljava/util/UUID;
    • ATTACK_SPEED_MODIFIER

      protected static final UUID ATTACK_SPEED_MODIFIER
      Mappings:
      Namespace Name Mixin selector
      official i Lado;i:Ljava/util/UUID;
      intermediary field_12304 Lnet/minecraft/class_1069;field_12304:Ljava/util/UUID;
      named ATTACK_SPEED_MODIFIER Lnet/minecraft/item/Item;ATTACK_SPEED_MODIFIER:Ljava/util/UUID;
    • RANDOM

      protected static Random RANDOM
      Mappings:
      Namespace Name Mixin selector
      official j Lado;j:Ljava/util/Random;
      intermediary field_4342 Lnet/minecraft/class_1069;field_4342:Ljava/util/Random;
      named RANDOM Lnet/minecraft/item/Item;RANDOM:Ljava/util/Random;
    • field_12303

      private final Registry<Identifier,ItemPropertyGetter> field_12303
      Mappings:
      Namespace Name Mixin selector
      official f Lado;f:Ldd;
      intermediary field_12303 Lnet/minecraft/class_1069;field_12303:Lnet/minecraft/class_1366;
      named field_12303 Lnet/minecraft/item/Item;field_12303:Lnet/minecraft/util/registry/Registry;
    • group

      private ItemGroup group
      The Item's ItemGroup
      Mappings:
      Namespace Name Mixin selector
      official n Lado;n:Lacq;
      intermediary field_4247 Lnet/minecraft/class_1069;field_4247:Lnet/minecraft/class_1041;
      named group Lnet/minecraft/item/Item;group:Lnet/minecraft/item/itemgroup/ItemGroup;
    • maxCount

      protected int maxCount
      The maximum stack size of an item
      Mappings:
      Namespace Name Mixin selector
      official k Lado;k:I
      intermediary field_4309 Lnet/minecraft/class_1069;field_4309:I
      named maxCount Lnet/minecraft/item/Item;maxCount:I
    • maxDamage

      private int maxDamage
      The maximum durability of an Item
      Mappings:
      Namespace Name Mixin selector
      official o Lado;o:I
      intermediary field_4296 Lnet/minecraft/class_1069;field_4296:I
      named maxDamage Lnet/minecraft/item/Item;maxDamage:I
    • handheld

      protected boolean handheld
      Sets whether the item is handheld
      Mappings:
      Namespace Name Mixin selector
      official l Lado;l:Z
      intermediary field_4311 Lnet/minecraft/class_1069;field_4311:Z
      named handheld Lnet/minecraft/item/Item;handheld:Z
    • damageable

      protected boolean damageable
      Sets whether the item has durability
      Mappings:
      Namespace Name Mixin selector
      official m Lado;m:Z
      intermediary field_4312 Lnet/minecraft/class_1069;field_4312:Z
      named damageable Lnet/minecraft/item/Item;damageable:Z
    • recipeRemainder

      private Item recipeRemainder
      The item's recipe remainder. Used by Buckets and potions.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official p Lado;p:Lado;
      intermediary field_4341 Lnet/minecraft/class_1069;field_4341:Lnet/minecraft/class_1069;
      named recipeRemainder Lnet/minecraft/item/Item;recipeRemainder:Lnet/minecraft/item/Item;
    • translationKey

      private String translationKey
      The Item's translation key.
      Mappings:
      Namespace Name Mixin selector
      official q Lado;q:Ljava/lang/String;
      intermediary field_4314 Lnet/minecraft/class_1069;field_4314:Ljava/lang/String;
      named translationKey Lnet/minecraft/item/Item;translationKey: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> Lado;<init>()V
      intermediary <init> Lnet/minecraft/class_1069;<init>()V
      named <init> Lnet/minecraft/item/Item;<init>()V
  • Method Details

    • getRawId

      public static int getRawId(Item item)
      Returns a numeric id for an Item
      Returns:
      Numeric Id
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Lado;)I
      intermediary method_6364 Lnet/minecraft/class_1069;method_6364(Lnet/minecraft/class_1069;)I
      named getRawId Lnet/minecraft/item/Item;getRawId(Lnet/minecraft/item/Item;)I
    • byRawId

      public static Item byRawId(int id)
      Returns an Item for its numeric Id
      Returns:
      Item
      Mappings:
      Namespace Name Mixin selector
      official c Lado;c(I)Lado;
      intermediary method_6366 Lnet/minecraft/class_1069;method_6366(I)Lnet/minecraft/class_1069;
      named byRawId Lnet/minecraft/item/Item;byRawId(I)Lnet/minecraft/item/Item;
    • fromBlock

      @Nullable public static Item fromBlock(Block block)
      Returns a BlockItem from a block
      Returns:
      Block
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Lajt;)Lado;
      intermediary method_6363 Lnet/minecraft/class_1069;method_6363(Lnet/minecraft/class_197;)Lnet/minecraft/class_1069;
      named fromBlock Lnet/minecraft/item/Item;fromBlock(Lnet/minecraft/block/Block;)Lnet/minecraft/item/Item;
    • getFromId

      public static Item getFromId(String id)
      Returns an Item from its name or its numeric Id as a String
      Returns:
      Item
      Mappings:
      Namespace Name Mixin selector
      official d Lado;d(Ljava/lang/String;)Lado;
      intermediary method_6325 Lnet/minecraft/class_1069;method_6325(Ljava/lang/String;)Lnet/minecraft/class_1069;
      named getFromId Lnet/minecraft/item/Item;getFromId(Ljava/lang/String;)Lnet/minecraft/item/Item;
    • addProperty

      public final void addProperty(Identifier identifier, ItemPropertyGetter itemPropertyGetter)
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Lkl;Ladr;)V
      intermediary method_11375 Lnet/minecraft/class_1069;method_11375(Lnet/minecraft/class_1653;Lnet/minecraft/class_2688;)V
      named addProperty Lnet/minecraft/item/Item;addProperty(Lnet/minecraft/util/Identifier;Lnet/minecraft/item/ItemPropertyGetter;)V
    • getProperty

      @Environment(CLIENT) @Nullable public ItemPropertyGetter getProperty(Identifier identifier)
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Lkl;)Ladr;
      intermediary method_11374 Lnet/minecraft/class_1069;method_11374(Lnet/minecraft/class_1653;)Lnet/minecraft/class_2688;
      named getProperty Lnet/minecraft/item/Item;getProperty(Lnet/minecraft/util/Identifier;)Lnet/minecraft/item/ItemPropertyGetter;
    • hasProperties

      @Environment(CLIENT) public boolean hasProperties()
      Mappings:
      Namespace Name Mixin selector
      official i Lado;i()Z
      intermediary method_11376 Lnet/minecraft/class_1069;method_11376()Z
      named hasProperties Lnet/minecraft/item/Item;hasProperties()Z
    • postProcessNbt

      public boolean postProcessNbt(NbtCompound nbt)
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Ldq;)Z
      intermediary method_11287 Lnet/minecraft/class_1069;method_11287(Lnet/minecraft/class_322;)Z
      named postProcessNbt Lnet/minecraft/item/Item;postProcessNbt(Lnet/minecraft/nbt/NbtCompound;)Z
    • setMaxCount

      public Item setMaxCount(int count)
      Sets the max stack size of the Item
      Parameters:
      count - Maximum stack size
      Returns:
      The current Item
      Mappings:
      Namespace Name Mixin selector
      official d Lado;d(I)Lado;
      intermediary method_3373 Lnet/minecraft/class_1069;method_3373(I)Lnet/minecraft/class_1069;
      named setMaxCount Lnet/minecraft/item/Item;setMaxCount(I)Lnet/minecraft/item/Item;
    • method_3355

      public ActionResult method_3355(ItemStack itemStack, PlayerEntity playerEntity, World world, BlockPos blockPos, Hand hand, Direction direction, float float2, float float3, float float4)
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Ladq;Lzj;Laht;Lcl;Lqm;Lcs;FFF)Lqo;
      intermediary method_3355 Lnet/minecraft/class_1069;method_3355(Lnet/minecraft/class_1071;Lnet/minecraft/class_988;Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2961;Lnet/minecraft/class_1354;FFF)Lnet/minecraft/class_2962;
      named method_3355 Lnet/minecraft/item/Item;method_3355(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/Hand;Lnet/minecraft/util/math/Direction;FFF)Lnet/minecraft/util/ActionResult;
    • getBlockBreakingSpeed

      public float getBlockBreakingSpeed(ItemStack stack, BlockState state)
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Ladq;Lard;)F
      intermediary method_3351 Lnet/minecraft/class_1069;method_3351(Lnet/minecraft/class_1071;Lnet/minecraft/class_2232;)F
      named getBlockBreakingSpeed Lnet/minecraft/item/Item;getBlockBreakingSpeed(Lnet/minecraft/item/ItemStack;Lnet/minecraft/block/BlockState;)F
    • method_11373

      public TypedActionResult<ItemStack> method_11373(ItemStack itemStack, World world, PlayerEntity playerEntity, Hand hand)
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Ladq;Laht;Lzj;Lqm;)Lqp;
      intermediary method_11373 Lnet/minecraft/class_1069;method_11373(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_988;Lnet/minecraft/class_2961;)Lnet/minecraft/class_2963;
      named method_11373 Lnet/minecraft/item/Item;method_11373(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/TypedActionResult;
    • method_3367

      @Nullable public ItemStack method_3367(ItemStack stack, World world, LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Ladq;Laht;Lsa;)Ladq;
      intermediary method_3367 Lnet/minecraft/class_1069;method_3367(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_1699;)Lnet/minecraft/class_1071;
      named method_3367 Lnet/minecraft/item/Item;method_3367(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;)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 j Lado;j()I
      intermediary method_3382 Lnet/minecraft/class_1069;method_3382()I
      named getMaxCount Lnet/minecraft/item/Item;getMaxCount()I
    • getMeta

      public int getMeta(int i)
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(I)I
      intermediary method_3363 Lnet/minecraft/class_1069;method_3363(I)I
      named getMeta Lnet/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 k Lado;k()Z
      intermediary method_3384 Lnet/minecraft/class_1069;method_3384()Z
      named isUnbreakable Lnet/minecraft/item/Item;isUnbreakable()Z
    • setUnbreakable

      protected Item setUnbreakable(boolean unbreakable)
      Sets the current item as unbreakable.
      Parameters:
      unbreakable - Unbreakable
      Returns:
      The current Item
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Z)Lado;
      intermediary method_3361 Lnet/minecraft/class_1069;method_3361(Z)Lnet/minecraft/class_1069;
      named setUnbreakable Lnet/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 l Lado;l()I
      intermediary method_3386 Lnet/minecraft/class_1069;method_3386()I
      named getMaxDamage Lnet/minecraft/item/Item;getMaxDamage()I
    • setMaxDamage

      protected Item setMaxDamage(int damage)
      Sets the maximum durability of the current Item.
      Parameters:
      damage - Maximum durability
      Returns:
      The current Item
      Mappings:
      Namespace Name Mixin selector
      official e Lado;e(I)Lado;
      intermediary method_3376 Lnet/minecraft/class_1069;method_3376(I)Lnet/minecraft/class_1069;
      named setMaxDamage Lnet/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.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official m Lado;m()Z
      intermediary method_3387 Lnet/minecraft/class_1069;method_3387()Z
      named isDamageable Lnet/minecraft/item/Item;isDamageable()Z
    • onEntityHit

      public boolean onEntityHit(ItemStack stack, LivingEntity entity1, LivingEntity entity2)
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Ladq;Lsa;Lsa;)Z
      intermediary method_3354 Lnet/minecraft/class_1069;method_3354(Lnet/minecraft/class_1071;Lnet/minecraft/class_1699;Lnet/minecraft/class_1699;)Z
      named onEntityHit Lnet/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 a Lado;a(Ladq;Laht;Lard;Lcl;Lsa;)Z
      intermediary method_3356 Lnet/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;)Z
      named method_3356 Lnet/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

      public boolean method_3346(BlockState blockState)
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Lard;)Z
      intermediary method_3346 Lnet/minecraft/class_1069;method_3346(Lnet/minecraft/class_2232;)Z
      named method_3346 Lnet/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 a Lado;a(Ladq;Lzj;Lsa;Lqm;)Z
      intermediary method_3353 Lnet/minecraft/class_1069;method_3353(Lnet/minecraft/class_1071;Lnet/minecraft/class_988;Lnet/minecraft/class_1699;Lnet/minecraft/class_2961;)Z
      named method_3353 Lnet/minecraft/item/Item;method_3353(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/util/Hand;)Z
    • setHandheld

      public Item setHandheld()
      Sets the item to look as handheld.
      Returns:
      The current Item
      Mappings:
      Namespace Name Mixin selector
      official n Lado;n()Lado;
      intermediary method_3389 Lnet/minecraft/class_1069;method_3389()Lnet/minecraft/class_1069;
      named setHandheld Lnet/minecraft/item/Item;setHandheld()Lnet/minecraft/item/Item;
    • isHandheld

      @Environment(CLIENT) public boolean isHandheld()
      Returns whether the item is supposed to look as handheld.
      Mappings:
      Namespace Name Mixin selector
      official A_ Lado;A_()Z
      intermediary method_3372 Lnet/minecraft/class_1069;method_3372()Z
      named isHandheld Lnet/minecraft/item/Item;isHandheld()Z
    • shouldRotate

      @Environment(CLIENT) public boolean shouldRotate()
      Mappings:
      Namespace Name Mixin selector
      official C_ Lado;C_()Z
      intermediary method_3390 Lnet/minecraft/class_1069;method_3390()Z
      named shouldRotate Lnet/minecraft/item/Item;shouldRotate()Z
    • setTranslationKey

      public Item setTranslationKey(String translationKey)
      Sets the current item's translation key.
      Parameters:
      translationKey - Translation key
      Returns:
      The current Item
      Mappings:
      Namespace Name Mixin selector
      official c Lado;c(Ljava/lang/String;)Lado;
      intermediary method_6365 Lnet/minecraft/class_1069;method_6365(Ljava/lang/String;)Lnet/minecraft/class_1069;
      named setTranslationKey Lnet/minecraft/item/Item;setTranslationKey(Ljava/lang/String;)Lnet/minecraft/item/Item;
    • getItemstackTranslatedName

      public String getItemstackTranslatedName(ItemStack stack)
      Returns the translated name of an ItemStack
      Parameters:
      stack - The ItemStack
      Returns:
      Translated name
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official j Lado;j(Ladq;)Ljava/lang/String;
      intermediary method_3379 Lnet/minecraft/class_1069;method_3379(Lnet/minecraft/class_1071;)Ljava/lang/String;
      named getItemstackTranslatedName Lnet/minecraft/item/Item;getItemstackTranslatedName(Lnet/minecraft/item/ItemStack;)Ljava/lang/String;
    • getTranslationKey

      public String getTranslationKey()
      Returns the translation key of the current Item
      Returns:
      Translation key
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a()Ljava/lang/String;
      intermediary method_3342 Lnet/minecraft/class_1069;method_3342()Ljava/lang/String;
      named getTranslationKey Lnet/minecraft/item/Item;getTranslationKey()Ljava/lang/String;
    • getTranslationKey

      public String getTranslationKey(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official f_ Lado;f_(Ladq;)Ljava/lang/String;
      intermediary method_3371 Lnet/minecraft/class_1069;method_3371(Lnet/minecraft/class_1071;)Ljava/lang/String;
      named getTranslationKey Lnet/minecraft/item/Item;getTranslationKey(Lnet/minecraft/item/ItemStack;)Ljava/lang/String;
    • setRecipeRemainder

      public Item setRecipeRemainder(Item recipeRemainder)
      Sets the item's recipe remainder
      Returns:
      The current Item
      Mappings:
      Namespace Name Mixin selector
      official b Lado;b(Lado;)Lado;
      intermediary method_3349 Lnet/minecraft/class_1069;method_3349(Lnet/minecraft/class_1069;)Lnet/minecraft/class_1069;
      named setRecipeRemainder Lnet/minecraft/item/Item;setRecipeRemainder(Lnet/minecraft/item/Item;)Lnet/minecraft/item/Item;
    • shouldSyncNbtToClient

      public boolean shouldSyncNbtToClient()
      Mappings:
      Namespace Name Mixin selector
      official p Lado;p()Z
      intermediary method_3391 Lnet/minecraft/class_1069;method_3391()Z
      named shouldSyncNbtToClient Lnet/minecraft/item/Item;shouldSyncNbtToClient()Z
    • getRecipeRemainder

      public Item getRecipeRemainder()
      Returns the current Item's recipe remainder
      Returns:
      recipeRemainder
      Mappings:
      Namespace Name Mixin selector
      official q Lado;q()Lado;
      intermediary method_3392 Lnet/minecraft/class_1069;method_3392()Lnet/minecraft/class_1069;
      named getRecipeRemainder Lnet/minecraft/item/Item;getRecipeRemainder()Lnet/minecraft/item/Item;
    • isFood

      public boolean isFood()
      Mappings:
      Namespace Name Mixin selector
      official r Lado;r()Z
      intermediary method_3393 Lnet/minecraft/class_1069;method_3393()Z
      named isFood Lnet/minecraft/item/Item;isFood()Z
    • inventoryTick

      public void inventoryTick(ItemStack stack, World world, Entity entity, int slot, boolean selected)
      Runs every tick when the item is in an inventory.
      Parameters:
      stack - The item in an ItemStack form
      world - The world where the item is ticking
      entity - The entity whose inventory contains the item
      slot - The slot in which the item is placed
      selected - Whether the item is currently selected by the entity
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Ladq;Laht;Lrr;IZ)V
      intermediary method_3357 Lnet/minecraft/class_1069;method_3357(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_864;IZ)V
      named inventoryTick Lnet/minecraft/item/Item;inventoryTick(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/Entity;IZ)V
    • onCraft

      public void onCraft(ItemStack stack, World world, PlayerEntity player)
      Runs when the item is crafted
      Parameters:
      stack - The item in an ItemStack form
      world - The world where the crafting happened
      player - The player who crafted the item
      Mappings:
      Namespace Name Mixin selector
      official b Lado;b(Ladq;Laht;Lzj;)V
      intermediary method_3375 Lnet/minecraft/class_1069;method_3375(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_988;)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 f Lado;f()Z
      intermediary method_3388 Lnet/minecraft/class_1069;method_3388()Z
      named isNetworkSynced Lnet/minecraft/item/Item;isNetworkSynced()Z
    • getUseAction

      public UseAction getUseAction(ItemStack stack)
      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 f Lado;f(Ladq;)Lafa;
      intermediary method_3366 Lnet/minecraft/class_1069;method_3366(Lnet/minecraft/class_1071;)Lnet/minecraft/class_1099;
      named getUseAction Lnet/minecraft/item/Item;getUseAction(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/UseAction;
    • getMaxUseTime

      public int getMaxUseTime(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official e Lado;e(Ladq;)I
      intermediary method_3350 Lnet/minecraft/class_1069;method_3350(Lnet/minecraft/class_1071;)I
      named getMaxUseTime Lnet/minecraft/item/Item;getMaxUseTime(Lnet/minecraft/item/ItemStack;)I
    • method_3359

      public void method_3359(ItemStack stack, World world, LivingEntity entity, int int2)
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Ladq;Laht;Lsa;I)V
      intermediary method_3359 Lnet/minecraft/class_1069;method_3359(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_1699;I)V
      named method_3359 Lnet/minecraft/item/Item;method_3359(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;I)V
    • appendTooltip

      @Environment(CLIENT) public void appendTooltip(ItemStack stack, PlayerEntity player, List<String> lines, boolean advanced)
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Ladq;Lzj;Ljava/util/List;Z)V
      intermediary method_3352 Lnet/minecraft/class_1069;method_3352(Lnet/minecraft/class_1071;Lnet/minecraft/class_988;Ljava/util/List;Z)V
      named appendTooltip Lnet/minecraft/item/Item;appendTooltip(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/PlayerEntity;Ljava/util/List;Z)V
    • getDisplayName

      public String getDisplayName(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Ladq;)Ljava/lang/String;
      intermediary method_3383 Lnet/minecraft/class_1069;method_3383(Lnet/minecraft/class_1071;)Ljava/lang/String;
      named getDisplayName Lnet/minecraft/item/Item;getDisplayName(Lnet/minecraft/item/ItemStack;)Ljava/lang/String;
    • hasEnchantmentGlint

      @Environment(CLIENT) public boolean hasEnchantmentGlint(ItemStack stack)
      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 i_ Lado;i_(Ladq;)Z
      intermediary method_3374 Lnet/minecraft/class_1069;method_3374(Lnet/minecraft/class_1071;)Z
      named hasEnchantmentGlint Lnet/minecraft/item/Item;hasEnchantmentGlint(Lnet/minecraft/item/ItemStack;)Z
    • getRarity

      public Rarity getRarity(ItemStack stack)
      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:
      Mappings:
      Namespace Name Mixin selector
      official g Lado;g(Ladq;)Laee;
      intermediary method_3377 Lnet/minecraft/class_1069;method_3377(Lnet/minecraft/class_1071;)Lnet/minecraft/class_1081;
      named getRarity Lnet/minecraft/item/Item;getRarity(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/Rarity;
    • isEnchantable

      public boolean isEnchantable(ItemStack stack)
      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 g_ Lado;g_(Ladq;)Z
      intermediary method_3385 Lnet/minecraft/class_1069;method_3385(Lnet/minecraft/class_1071;)Z
      named isEnchantable Lnet/minecraft/item/Item;isEnchantable(Lnet/minecraft/item/ItemStack;)Z
    • onHit

      protected BlockHitResult onHit(World world, PlayerEntity player, boolean liquid)
      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 in
      player - The player holding the item
      Returns:
      HitResult
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Laht;Lzj;Z)Lbbg;
      intermediary method_3360 Lnet/minecraft/class_1069;method_3360(Lnet/minecraft/class_1150;Lnet/minecraft/class_988;Z)Lnet/minecraft/class_234;
      named onHit Lnet/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
      Returns:
      Enchantability
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official c Lado;c()I
      intermediary method_3362 Lnet/minecraft/class_1069;method_3362()I
      named getEnchantability Lnet/minecraft/item/Item;getEnchantability()I
    • appendItemStacks

      @Environment(CLIENT) public void appendItemStacks(Item item, ItemGroup group, List<ItemStack> list)
      Registers an item's sub items
      Parameters:
      item - The Item instance
      group - The ItemGroup
      list - The list of sub items
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Lado;Lacq;Ljava/util/List;)V
      intermediary method_3345 Lnet/minecraft/class_1069;method_3345(Lnet/minecraft/class_1069;Lnet/minecraft/class_1041;Ljava/util/List;)V
      named appendItemStacks Lnet/minecraft/item/Item;appendItemStacks(Lnet/minecraft/item/Item;Lnet/minecraft/item/itemgroup/ItemGroup;Ljava/util/List;)V
    • getItemGroup

      @Environment(CLIENT) public ItemGroup getItemGroup()
      Returns the itemgroup that the item is in
      Mappings:
      Namespace Name Mixin selector
      official b Lado;b()Lacq;
      intermediary method_3398 Lnet/minecraft/class_1069;method_3398()Lnet/minecraft/class_1041;
      named getItemGroup Lnet/minecraft/item/Item;getItemGroup()Lnet/minecraft/item/itemgroup/ItemGroup;
    • setItemGroup

      public Item setItemGroup(ItemGroup group)
      Sets the itemgroup that the current item should be in
      Parameters:
      group - The ItemGroup
      Returns:
      The current Item
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Lacq;)Lado;
      intermediary method_3348 Lnet/minecraft/class_1069;method_3348(Lnet/minecraft/class_1041;)Lnet/minecraft/class_1069;
      named setItemGroup Lnet/minecraft/item/Item;setItemGroup(Lnet/minecraft/item/itemgroup/ItemGroup;)Lnet/minecraft/item/Item;
    • hasSubTypes

      public boolean hasSubTypes()
      Mappings:
      Namespace Name Mixin selector
      official s Lado;s()Z
      intermediary method_4616 Lnet/minecraft/class_1069;method_4616()Z
      named hasSubTypes Lnet/minecraft/item/Item;hasSubTypes()Z
    • canRepair

      public boolean canRepair(ItemStack stack, ItemStack ingredient)
      Returns whether the item can be repaired via an anvil or crafting table.
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Ladq;Ladq;)Z
      intermediary method_4615 Lnet/minecraft/class_1069;method_4615(Lnet/minecraft/class_1071;Lnet/minecraft/class_1071;)Z
      named canRepair Lnet/minecraft/item/Item;canRepair(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z
    • method_6326

      public Multimap<String,AttributeModifier> method_6326(EquipmentSlot equipmentSlot)
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Lrw;)Lcom/google/common/collect/Multimap;
      intermediary method_6326 Lnet/minecraft/class_1069;method_6326(Lnet/minecraft/class_2968;)Lcom/google/common/collect/Multimap;
      named method_6326 Lnet/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 t Lado;t()V
      intermediary method_6368 Lnet/minecraft/class_1069;method_6368()V
      named setup Lnet/minecraft/item/Item;setup()V
    • registerBlockItem

      private static void registerBlockItem(Block block)
      Overloaded method that registers a BlockItem to the registry
      Parameters:
      block - The block
      Mappings:
      Namespace Name Mixin selector
      official b Lado;b(Lajt;)V
      intermediary method_11288 Lnet/minecraft/class_1069;method_11288(Lnet/minecraft/class_197;)V
      named registerBlockItem Lnet/minecraft/item/Item;registerBlockItem(Lnet/minecraft/block/Block;)V
    • registerBlockItem

      protected static void registerBlockItem(Block block, Item blockItem)
      Registers a BlockItem to the registry
      Parameters:
      block - The Block
      blockItem - The BlockItem
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Lajt;Lado;)V
      intermediary method_11286 Lnet/minecraft/class_1069;method_11286(Lnet/minecraft/class_197;Lnet/minecraft/class_1069;)V
      named registerBlockItem Lnet/minecraft/item/Item;registerBlockItem(Lnet/minecraft/block/Block;Lnet/minecraft/item/Item;)V
    • register

      private static void register(int id, String name, Item item)
      Overloaded method that registers an Item to the registry
      Parameters:
      id - The Item Id
      name - The Item's name
      item - The item to be registered
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(ILjava/lang/String;Lado;)V
      intermediary method_11284 Lnet/minecraft/class_1069;method_11284(ILjava/lang/String;Lnet/minecraft/class_1069;)V
      named register Lnet/minecraft/item/Item;register(ILjava/lang/String;Lnet/minecraft/item/Item;)V
    • register

      private static void register(int id, Identifier name, Item item)
      Registers an item to the registry
      Parameters:
      id - The Item Id
      name - The Item's identifier
      item - The Item to be registered
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(ILkl;Lado;)V
      intermediary method_11285 Lnet/minecraft/class_1069;method_11285(ILnet/minecraft/class_1653;Lnet/minecraft/class_1069;)V
      named register Lnet/minecraft/item/Item;register(ILnet/minecraft/util/Identifier;Lnet/minecraft/item/Item;)V