类 Item
- java.lang.Object
-
- net.minecraft.item.Item
-
- 所有已实现的接口:
ItemConvertible
- 直接已知子类:
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,HoneycombItem,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 bpnintermediary net/minecraft/class_1792named net/minecraft/item/Item
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classItem.Settings
-
字段概要
字段 修饰符和类型 字段 说明 protected static UUIDATTACK_DAMAGE_MODIFIER_IDprotected static UUIDATTACK_SPEED_MODIFIER_IDstatic Map<Block,Item>BLOCK_ITEMSstatic intDEFAULT_MAX_COUNTstatic intfield_30888static intfield_30889private booleanfireproofprivate @Nullable FoodComponentfoodComponentprotected ItemGroupgroupprivate static LoggerLOGGERprivate intmaxCountprivate intmaxDamageprivate Rarityrarityprivate ItemrecipeRemainderprivate @Nullable StringtranslationKey
-
构造器概要
构造器 构造器 说明 Item(Item.Settings settings)
-
方法概要
所有方法 静态方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 voidappendStacks(ItemGroup group, DefaultedList<ItemStack> stacks)voidappendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context)ItemasItem()Gets this object in its item form.static ItembyRawId(int id)booleancanBeNested()booleancanMine(BlockState state, World world, BlockPos pos, PlayerEntity miner)Checks if a player can break a block while holding the item.booleancanRepair(ItemStack stack, ItemStack ingredient)booleandamage(DamageSource source)ItemStackfinishUsing(ItemStack stack, World world, LivingEntity user)static ItemfromBlock(Block block)已过时。Please useBlock.asItem()Multimap<EntityAttribute,EntityAttributeModifier>getAttributeModifiers(EquipmentSlot slot)ItemStackgetDefaultStack()SoundEventgetDrinkSound()SoundEventgetEatSound()intgetEnchantability()Gets the enchantability of an item.@Nullable SoundEventgetEquipSound()@Nullable FoodComponentgetFoodComponent()@Nullable ItemGroupgetGroup()intgetItemBarColor(ItemStack stack)intgetItemBarStep(ItemStack stack)intgetMaxCount()intgetMaxDamage()intgetMaxUseTime(ItemStack stack)floatgetMiningSpeedMultiplier(ItemStack stack, BlockState state)TextgetName()TextgetName(ItemStack stack)protected StringgetOrCreateTranslationKey()RaritygetRarity(ItemStack stack)static intgetRawId(Item item)@Nullable ItemgetRecipeRemainder()Gets the remainder item that should be left behind when this item is used as a crafting ingredient.Optional<TooltipData>getTooltipData(ItemStack stack)StringgetTranslationKey()Gets the translation key of this item.StringgetTranslationKey(ItemStack stack)Gets the translation key of this item using the provided item stack for context.UseActiongetUseAction(ItemStack stack)booleanhasGlint(ItemStack stack)Checks if the glint effect should be applied when the item is rendered.booleanhasRecipeRemainder()Checks if this item has a remainder item that is left behind when used as a crafting ingredient.voidinventoryTick(ItemStack stack, World world, Entity entity, int slot, boolean selected)booleanisDamageable()booleanisEnchantable(ItemStack stack)booleanisFireproof()booleanisFood()Checks if this item is food and therefore is edible.protected booleanisIn(ItemGroup group)Checks whether this item should appear in a specified item group.booleanisItemBarVisible(ItemStack stack)booleanisNetworkSynced()booleanisSuitableFor(BlockState state)Determines whether this item can be used as a suitable tool for mining the specified block.booleanisUsedOnRelease(ItemStack stack)booleanonClicked(ItemStack stack, ItemStack otherStack, Slot slot, ClickType clickType, PlayerEntity player, CommandItemSlot cursorSlot)voidonCraft(ItemStack stack, World world, PlayerEntity player)Called when a player acquires the item by crafting, smelting, smithing, etc.voidonItemEntityDestroyed(ItemEntity entity)booleanonStackClicked(ItemStack stack, Slot slot, ClickType clickType, PlayerEntity player)voidonStoppedUsing(ItemStack stack, World world, LivingEntity user, int remainingUseTicks)booleanpostHit(ItemStack stack, LivingEntity target, LivingEntity attacker)booleanpostMine(ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner)booleanpostProcessNbt(CompoundTag nbt)protected static BlockHitResultraycast(World world, PlayerEntity player, RaycastContext.FluidHandling fluidHandling)booleanshouldSyncTagToClient()Checks if an item should have its NBT data stored inItemStack.tagsent to the client.StringtoString()voidusageTick(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.ActionResultuseOnBlock(ItemUsageContext context)Called when an item is used on a block.ActionResultuseOnEntity(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand)
-
-
-
字段详细资料
-
LOGGER
private static final Logger LOGGER
- Mappings:
Namespace Name Mixin selector official aLbpn;a:Lorg/apache/logging/log4j/Logger;intermediary field_27017Lnet/minecraft/class_1792;field_27017:Lorg/apache/logging/log4j/Logger;named LOGGERLnet/minecraft/item/Item;LOGGER:Lorg/apache/logging/log4j/Logger;
-
BLOCK_ITEMS
public static final Map<Block,Item> BLOCK_ITEMS
- Mappings:
Namespace Name Mixin selector official kLbpn;k:Ljava/util/Map;intermediary field_8003Lnet/minecraft/class_1792;field_8003:Ljava/util/Map;named BLOCK_ITEMSLnet/minecraft/item/Item;BLOCK_ITEMS:Ljava/util/Map;
-
ATTACK_DAMAGE_MODIFIER_ID
protected static final UUID ATTACK_DAMAGE_MODIFIER_ID
- Mappings:
Namespace Name Mixin selector official lLbpn;l:Ljava/util/UUID;intermediary field_8006Lnet/minecraft/class_1792;field_8006:Ljava/util/UUID;named ATTACK_DAMAGE_MODIFIER_IDLnet/minecraft/item/Item;ATTACK_DAMAGE_MODIFIER_ID:Ljava/util/UUID;
-
ATTACK_SPEED_MODIFIER_ID
protected static final UUID ATTACK_SPEED_MODIFIER_ID
- Mappings:
Namespace Name Mixin selector official mLbpn;m:Ljava/util/UUID;intermediary field_8001Lnet/minecraft/class_1792;field_8001:Ljava/util/UUID;named ATTACK_SPEED_MODIFIER_IDLnet/minecraft/item/Item;ATTACK_SPEED_MODIFIER_ID:Ljava/util/UUID;
-
DEFAULT_MAX_COUNT
public static final int DEFAULT_MAX_COUNT
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official nLbpn;n:Iintermediary field_30887Lnet/minecraft/class_1792;field_30887:Inamed DEFAULT_MAX_COUNTLnet/minecraft/item/Item;DEFAULT_MAX_COUNT:I
-
field_30888
public static final int field_30888
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official oLbpn;o:Iintermediary field_30888Lnet/minecraft/class_1792;field_30888:Inamed field_30888Lnet/minecraft/item/Item;field_30888:I
-
field_30889
public static final int field_30889
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official pLbpn;p:Iintermediary field_30889Lnet/minecraft/class_1792;field_30889:Inamed field_30889Lnet/minecraft/item/Item;field_30889:I
-
group
protected final ItemGroup group
- Mappings:
Namespace Name Mixin selector official qLbpn;q:Lboh;intermediary field_8004Lnet/minecraft/class_1792;field_8004:Lnet/minecraft/class_1761;named groupLnet/minecraft/item/Item;group:Lnet/minecraft/item/ItemGroup;
-
rarity
private final Rarity rarity
- Mappings:
Namespace Name Mixin selector official bLbpn;b:Lbqg;intermediary field_8009Lnet/minecraft/class_1792;field_8009:Lnet/minecraft/class_1814;named rarityLnet/minecraft/item/Item;rarity:Lnet/minecraft/util/Rarity;
-
maxCount
private final int maxCount
- Mappings:
Namespace Name Mixin selector official cLbpn;c:Iintermediary field_8013Lnet/minecraft/class_1792;field_8013:Inamed maxCountLnet/minecraft/item/Item;maxCount:I
-
maxDamage
private final int maxDamage
- Mappings:
Namespace Name Mixin selector official dLbpn;d:Iintermediary field_8012Lnet/minecraft/class_1792;field_8012:Inamed maxDamageLnet/minecraft/item/Item;maxDamage:I
-
fireproof
private final boolean fireproof
- Mappings:
Namespace Name Mixin selector official eLbpn;e:Zintermediary field_21979Lnet/minecraft/class_1792;field_21979:Znamed fireproofLnet/minecraft/item/Item;fireproof:Z
-
recipeRemainder
private final Item recipeRemainder
- Mappings:
Namespace Name Mixin selector official fLbpn;f:Lbpn;intermediary field_8008Lnet/minecraft/class_1792;field_8008:Lnet/minecraft/class_1792;named recipeRemainderLnet/minecraft/item/Item;recipeRemainder:Lnet/minecraft/item/Item;
-
translationKey
@Nullable private @Nullable String translationKey
- Mappings:
Namespace Name Mixin selector official gLbpn;g:Ljava/lang/String;intermediary field_8014Lnet/minecraft/class_1792;field_8014:Ljava/lang/String;named translationKeyLnet/minecraft/item/Item;translationKey:Ljava/lang/String;
-
foodComponent
@Nullable private final @Nullable FoodComponent foodComponent
- Mappings:
Namespace Name Mixin selector official hLbpn;h:Lbli;intermediary field_18672Lnet/minecraft/class_1792;field_18672:Lnet/minecraft/class_4174;named foodComponentLnet/minecraft/item/Item;foodComponent:Lnet/minecraft/item/FoodComponent;
-
-
构造器详细资料
-
Item
public Item(Item.Settings settings)
- Mappings:
Namespace Name Mixin selector official <init>Lbpn;<init>(Lbpn$a;)Vintermediary <init>Lnet/minecraft/class_1792;<init>(Lnet/minecraft/class_1792$class_1793;)Vnamed <init>Lnet/minecraft/item/Item;<init>(Lnet/minecraft/item/Item$Settings;)V
-
-
方法详细资料
-
getRawId
public static int getRawId(Item item)
- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lbpn;)Iintermediary method_7880Lnet/minecraft/class_1792;method_7880(Lnet/minecraft/class_1792;)Inamed getRawIdLnet/minecraft/item/Item;getRawId(Lnet/minecraft/item/Item;)I
-
byRawId
public static Item byRawId(int id)
- Mappings:
Namespace Name Mixin selector official bLbpn;b(I)Lbpn;intermediary method_7875Lnet/minecraft/class_1792;method_7875(I)Lnet/minecraft/class_1792;named byRawIdLnet/minecraft/item/Item;byRawId(I)Lnet/minecraft/item/Item;
-
fromBlock
@Deprecated public static Item fromBlock(Block block)
已过时。Please useBlock.asItem()- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lbyq;)Lbpn;intermediary method_7867Lnet/minecraft/class_1792;method_7867(Lnet/minecraft/class_2248;)Lnet/minecraft/class_1792;named fromBlockLnet/minecraft/item/Item;fromBlock(Lnet/minecraft/block/Block;)Lnet/minecraft/item/Item;
-
usageTick
public void usageTick(World world, LivingEntity user, ItemStack stack, int remainingUseTicks)
- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lbvr;Lasy;Lbpr;I)Vintermediary method_7852Lnet/minecraft/class_1792;method_7852(Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;I)Vnamed usageTickLnet/minecraft/item/Item;usageTick(Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;I)V
-
onItemEntityDestroyed
public void onItemEntityDestroyed(ItemEntity entity)
- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lbge;)Vintermediary method_33261Lnet/minecraft/class_1792;method_33261(Lnet/minecraft/class_1542;)Vnamed onItemEntityDestroyedLnet/minecraft/item/Item;onItemEntityDestroyed(Lnet/minecraft/entity/ItemEntity;)V
-
postProcessNbt
public boolean postProcessNbt(CompoundTag nbt)
- Mappings:
Namespace Name Mixin selector official bLbpn;b(Lmv;)Zintermediary method_7860Lnet/minecraft/class_1792;method_7860(Lnet/minecraft/class_2487;)Znamed postProcessNbtLnet/minecraft/item/Item;postProcessNbt(Lnet/minecraft/nbt/CompoundTag;)Z
-
canMine
public boolean canMine(BlockState state, World world, BlockPos pos, PlayerEntity miner)
Checks if a player can break a block while holding the item.- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lcjr;Lbvr;Lgb;Lbjf;)Zintermediary method_7885Lnet/minecraft/class_1792;method_7885(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;)Znamed canMineLnet/minecraft/item/Item;canMine(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;)Z
-
asItem
public Item asItem()
Gets this object in its item form.- 指定者:
asItem在接口中ItemConvertible- Mappings:
Namespace Name Mixin selector official kLbvq;k()Lbpn;intermediary method_8389Lnet/minecraft/class_1935;method_8389()Lnet/minecraft/class_1792;named asItemLnet/minecraft/item/ItemConvertible;asItem()Lnet/minecraft/item/Item;
-
useOnBlock
public ActionResult useOnBlock(ItemUsageContext context)
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().- 参数:
context- the usage context- 返回:
- an action result that specifies if using the item on a block was successful.
- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lbrt;)Larg;intermediary method_7884Lnet/minecraft/class_1792;method_7884(Lnet/minecraft/class_1838;)Lnet/minecraft/class_1269;named useOnBlockLnet/minecraft/item/Item;useOnBlock(Lnet/minecraft/item/ItemUsageContext;)Lnet/minecraft/util/ActionResult;
-
getMiningSpeedMultiplier
public float getMiningSpeedMultiplier(ItemStack stack, BlockState state)
- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lbpr;Lcjr;)Fintermediary method_7865Lnet/minecraft/class_1792;method_7865(Lnet/minecraft/class_1799;Lnet/minecraft/class_2680;)Fnamed getMiningSpeedMultiplierLnet/minecraft/item/Item;getMiningSpeedMultiplier(Lnet/minecraft/item/ItemStack;Lnet/minecraft/block/BlockState;)F
-
use
public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand hand)
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().- 参数:
world- the world the item was used inuser- the player who used the itemhand- the hand used- 返回:
- 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 aLbpn;a(Lbvr;Lbjf;Larf;)Larh;intermediary method_7836Lnet/minecraft/class_1792;method_7836(Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1271;named useLnet/minecraft/item/Item;use(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/TypedActionResult;
-
finishUsing
public ItemStack finishUsing(ItemStack stack, World world, LivingEntity user)
- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lbpr;Lbvr;Lasy;)Lbpr;intermediary method_7861Lnet/minecraft/class_1792;method_7861(Lnet/minecraft/class_1799;Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;)Lnet/minecraft/class_1799;named finishUsingLnet/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 lLbpn;l()Iintermediary method_7882Lnet/minecraft/class_1792;method_7882()Inamed getMaxCountLnet/minecraft/item/Item;getMaxCount()I
-
getMaxDamage
public final int getMaxDamage()
- Mappings:
Namespace Name Mixin selector official mLbpn;m()Iintermediary method_7841Lnet/minecraft/class_1792;method_7841()Inamed getMaxDamageLnet/minecraft/item/Item;getMaxDamage()I
-
isDamageable
public boolean isDamageable()
- Mappings:
Namespace Name Mixin selector official nLbpn;n()Zintermediary method_7846Lnet/minecraft/class_1792;method_7846()Znamed isDamageableLnet/minecraft/item/Item;isDamageable()Z
-
isItemBarVisible
public boolean isItemBarVisible(ItemStack stack)
- Mappings:
Namespace Name Mixin selector official eLbpn;e(Lbpr;)Zintermediary method_31567Lnet/minecraft/class_1792;method_31567(Lnet/minecraft/class_1799;)Znamed isItemBarVisibleLnet/minecraft/item/Item;isItemBarVisible(Lnet/minecraft/item/ItemStack;)Z
-
getItemBarStep
public int getItemBarStep(ItemStack stack)
- Mappings:
Namespace Name Mixin selector official fLbpn;f(Lbpr;)Iintermediary method_31569Lnet/minecraft/class_1792;method_31569(Lnet/minecraft/class_1799;)Inamed getItemBarStepLnet/minecraft/item/Item;getItemBarStep(Lnet/minecraft/item/ItemStack;)I
-
getItemBarColor
public int getItemBarColor(ItemStack stack)
- Mappings:
Namespace Name Mixin selector official gLbpn;g(Lbpr;)Iintermediary method_31571Lnet/minecraft/class_1792;method_31571(Lnet/minecraft/class_1799;)Inamed getItemBarColorLnet/minecraft/item/Item;getItemBarColor(Lnet/minecraft/item/ItemStack;)I
-
onStackClicked
public boolean onStackClicked(ItemStack stack, Slot slot, ClickType clickType, PlayerEntity player)
- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lbpr;Lbnc;Lblt;Lbjf;)Zintermediary method_31565Lnet/minecraft/class_1792;method_31565(Lnet/minecraft/class_1799;Lnet/minecraft/class_1735;Lnet/minecraft/class_5536;Lnet/minecraft/class_1657;)Znamed onStackClickedLnet/minecraft/item/Item;onStackClicked(Lnet/minecraft/item/ItemStack;Lnet/minecraft/screen/slot/Slot;Lnet/minecraft/util/ClickType;Lnet/minecraft/entity/player/PlayerEntity;)Z
-
onClicked
public boolean onClicked(ItemStack stack, ItemStack otherStack, Slot slot, ClickType clickType, PlayerEntity player, CommandItemSlot cursorSlot)
- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lbpr;Lbpr;Lbnc;Lblt;Lbjf;Lato;)Zintermediary method_31566Lnet/minecraft/class_1792;method_31566(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;Lnet/minecraft/class_1735;Lnet/minecraft/class_5536;Lnet/minecraft/class_1657;Lnet/minecraft/class_5630;)Znamed onClickedLnet/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/PlayerEntity;Lnet/minecraft/inventory/CommandItemSlot;)Z
-
postHit
public boolean postHit(ItemStack stack, LivingEntity target, LivingEntity attacker)
- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lbpr;Lasy;Lasy;)Zintermediary method_7873Lnet/minecraft/class_1792;method_7873(Lnet/minecraft/class_1799;Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;)Znamed postHitLnet/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 aLbpn;a(Lbpr;Lbvr;Lcjr;Lgb;Lasy;)Zintermediary method_7879Lnet/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;)Znamed postMineLnet/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
public boolean isSuitableFor(BlockState state)
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 bLbpn;b(Lcjr;)Zintermediary method_7856Lnet/minecraft/class_1792;method_7856(Lnet/minecraft/class_2680;)Znamed isSuitableForLnet/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 aLbpn;a(Lbpr;Lbjf;Lasy;Larf;)Larg;intermediary method_7847Lnet/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 useOnEntityLnet/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
public Text getName()
- Mappings:
Namespace Name Mixin selector official oLbpn;o()Lon;intermediary method_7848Lnet/minecraft/class_1792;method_7848()Lnet/minecraft/class_2561;named getNameLnet/minecraft/item/Item;getName()Lnet/minecraft/text/Text;
-
toString
public String toString()
-
getOrCreateTranslationKey
protected String getOrCreateTranslationKey()
- Mappings:
Namespace Name Mixin selector official pLbpn;p()Ljava/lang/String;intermediary method_7869Lnet/minecraft/class_1792;method_7869()Ljava/lang/String;named getOrCreateTranslationKeyLnet/minecraft/item/Item;getOrCreateTranslationKey()Ljava/lang/String;
-
getTranslationKey
public String getTranslationKey()
Gets the translation key of this item.- Mappings:
Namespace Name Mixin selector official aLbpn;a()Ljava/lang/String;intermediary method_7876Lnet/minecraft/class_1792;method_7876()Ljava/lang/String;named getTranslationKeyLnet/minecraft/item/Item;getTranslationKey()Ljava/lang/String;
-
getTranslationKey
public String getTranslationKey(ItemStack stack)
Gets the translation key of this item using the provided item stack for context.- Mappings:
Namespace Name Mixin selector official jLbpn;j(Lbpr;)Ljava/lang/String;intermediary method_7866Lnet/minecraft/class_1792;method_7866(Lnet/minecraft/class_1799;)Ljava/lang/String;named getTranslationKeyLnet/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.tagsent 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 qLbpn;q()Zintermediary method_7887Lnet/minecraft/class_1792;method_7887()Znamed shouldSyncTagToClientLnet/minecraft/item/Item;shouldSyncTagToClient()Z
-
getRecipeRemainder
@Nullable public final @Nullable Item 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 rLbpn;r()Lbpn;intermediary method_7858Lnet/minecraft/class_1792;method_7858()Lnet/minecraft/class_1792;named getRecipeRemainderLnet/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 sLbpn;s()Zintermediary method_7857Lnet/minecraft/class_1792;method_7857()Znamed hasRecipeRemainderLnet/minecraft/item/Item;hasRecipeRemainder()Z
-
inventoryTick
public void inventoryTick(ItemStack stack, World world, Entity entity, int slot, boolean selected)
- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lbpr;Lbvr;Lasl;IZ)Vintermediary method_7888Lnet/minecraft/class_1792;method_7888(Lnet/minecraft/class_1799;Lnet/minecraft/class_1937;Lnet/minecraft/class_1297;IZ)Vnamed inventoryTickLnet/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)
Called when a player acquires the item by crafting, smelting, smithing, etc.- Mappings:
Namespace Name Mixin selector official bLbpn;b(Lbpr;Lbvr;Lbjf;)Vintermediary method_7843Lnet/minecraft/class_1792;method_7843(Lnet/minecraft/class_1799;Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;)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 af_Lbpn;af_()Zintermediary method_16698Lnet/minecraft/class_1792;method_16698()Znamed isNetworkSyncedLnet/minecraft/item/Item;isNetworkSynced()Z
-
getUseAction
public UseAction getUseAction(ItemStack stack)
- Mappings:
Namespace Name Mixin selector official d_Lbpn;d_(Lbpr;)Lbrg;intermediary method_7853Lnet/minecraft/class_1792;method_7853(Lnet/minecraft/class_1799;)Lnet/minecraft/class_1839;named getUseActionLnet/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_Lbpn;e_(Lbpr;)Iintermediary method_7881Lnet/minecraft/class_1792;method_7881(Lnet/minecraft/class_1799;)Inamed getMaxUseTimeLnet/minecraft/item/Item;getMaxUseTime(Lnet/minecraft/item/ItemStack;)I
-
onStoppedUsing
public void onStoppedUsing(ItemStack stack, World world, LivingEntity user, int remainingUseTicks)
- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lbpr;Lbvr;Lasy;I)Vintermediary method_7840Lnet/minecraft/class_1792;method_7840(Lnet/minecraft/class_1799;Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;I)Vnamed onStoppedUsingLnet/minecraft/item/Item;onStoppedUsing(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;I)V
-
appendTooltip
public void appendTooltip(ItemStack stack, @Nullable @Nullable World world, List<Text> tooltip, TooltipContext context)
- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lbpr;Lbvr;Ljava/util/List;Lbre;)Vintermediary method_7851Lnet/minecraft/class_1792;method_7851(Lnet/minecraft/class_1799;Lnet/minecraft/class_1937;Ljava/util/List;Lnet/minecraft/class_1836;)Vnamed appendTooltipLnet/minecraft/item/Item;appendTooltip(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Ljava/util/List;Lnet/minecraft/client/item/TooltipContext;)V
-
getTooltipData
public Optional<TooltipData> getTooltipData(ItemStack stack)
- Mappings:
Namespace Name Mixin selector official hLbpn;h(Lbpr;)Ljava/util/Optional;intermediary method_32346Lnet/minecraft/class_1792;method_32346(Lnet/minecraft/class_1799;)Ljava/util/Optional;named getTooltipDataLnet/minecraft/item/Item;getTooltipData(Lnet/minecraft/item/ItemStack;)Ljava/util/Optional;
-
getName
public Text getName(ItemStack stack)
- Mappings:
Namespace Name Mixin selector official mLbpn;m(Lbpr;)Lon;intermediary method_7864Lnet/minecraft/class_1792;method_7864(Lnet/minecraft/class_1799;)Lnet/minecraft/class_2561;named getNameLnet/minecraft/item/Item;getName(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/text/Text;
-
hasGlint
public boolean hasGlint(ItemStack stack)
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 iLbpn;i(Lbpr;)Zintermediary method_7886Lnet/minecraft/class_1792;method_7886(Lnet/minecraft/class_1799;)Znamed hasGlintLnet/minecraft/item/Item;hasGlint(Lnet/minecraft/item/ItemStack;)Z
-
getRarity
public Rarity getRarity(ItemStack stack)
- Mappings:
Namespace Name Mixin selector official nLbpn;n(Lbpr;)Lbqg;intermediary method_7862Lnet/minecraft/class_1792;method_7862(Lnet/minecraft/class_1799;)Lnet/minecraft/class_1814;named getRarityLnet/minecraft/item/Item;getRarity(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/Rarity;
-
isEnchantable
public boolean isEnchantable(ItemStack stack)
- Mappings:
Namespace Name Mixin selector official f_Lbpn;f_(Lbpr;)Zintermediary method_7870Lnet/minecraft/class_1792;method_7870(Lnet/minecraft/class_1799;)Znamed isEnchantableLnet/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 aLbpn;a(Lbvr;Lbjf;Lbuz$b;)Ldlw;intermediary method_7872Lnet/minecraft/class_1792;method_7872(Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_3959$class_242;)Lnet/minecraft/class_3965;named raycastLnet/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 cLbpn;c()Iintermediary method_7837Lnet/minecraft/class_1792;method_7837()Inamed getEnchantabilityLnet/minecraft/item/Item;getEnchantability()I
-
appendStacks
public void appendStacks(ItemGroup group, DefaultedList<ItemStack> stacks)
- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lboh;Lgn;)Vintermediary method_7850Lnet/minecraft/class_1792;method_7850(Lnet/minecraft/class_1761;Lnet/minecraft/class_2371;)Vnamed appendStacksLnet/minecraft/item/Item;appendStacks(Lnet/minecraft/item/ItemGroup;Lnet/minecraft/util/collection/DefaultedList;)V
-
isIn
protected boolean isIn(ItemGroup group)
Checks whether this item should appear in a specified item group.- 返回:
- true if the item is in the specified item group or the item group is
ItemGroup.SEARCH. - Mappings:
Namespace Name Mixin selector official aLbpn;a(Lboh;)Zintermediary method_7877Lnet/minecraft/class_1792;method_7877(Lnet/minecraft/class_1761;)Znamed isInLnet/minecraft/item/Item;isIn(Lnet/minecraft/item/ItemGroup;)Z
-
getGroup
@Nullable public final @Nullable ItemGroup getGroup()
- Mappings:
Namespace Name Mixin selector official tLbpn;t()Lboh;intermediary method_7859Lnet/minecraft/class_1792;method_7859()Lnet/minecraft/class_1761;named getGroupLnet/minecraft/item/Item;getGroup()Lnet/minecraft/item/ItemGroup;
-
canRepair
public boolean canRepair(ItemStack stack, ItemStack ingredient)
- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lbpr;Lbpr;)Zintermediary method_7878Lnet/minecraft/class_1792;method_7878(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Znamed canRepairLnet/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 aLbpn;a(Lasq;)Lcom/google/common/collect/Multimap;intermediary method_7844Lnet/minecraft/class_1792;method_7844(Lnet/minecraft/class_1304;)Lcom/google/common/collect/Multimap;named getAttributeModifiersLnet/minecraft/item/Item;getAttributeModifiers(Lnet/minecraft/entity/EquipmentSlot;)Lcom/google/common/collect/Multimap;
-
isUsedOnRelease
public boolean isUsedOnRelease(ItemStack stack)
- Mappings:
Namespace Name Mixin selector official lLbpn;l(Lbpr;)Zintermediary method_7838Lnet/minecraft/class_1792;method_7838(Lnet/minecraft/class_1799;)Znamed isUsedOnReleaseLnet/minecraft/item/Item;isUsedOnRelease(Lnet/minecraft/item/ItemStack;)Z
-
getDefaultStack
public ItemStack getDefaultStack()
- Mappings:
Namespace Name Mixin selector official ah_Lbpn;ah_()Lbpr;intermediary method_7854Lnet/minecraft/class_1792;method_7854()Lnet/minecraft/class_1799;named getDefaultStackLnet/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 uLbpn;u()Zintermediary method_19263Lnet/minecraft/class_1792;method_19263()Znamed isFoodLnet/minecraft/item/Item;isFood()Z
-
getFoodComponent
@Nullable public @Nullable FoodComponent getFoodComponent()
- Mappings:
Namespace Name Mixin selector official vLbpn;v()Lbli;intermediary method_19264Lnet/minecraft/class_1792;method_19264()Lnet/minecraft/class_4174;named getFoodComponentLnet/minecraft/item/Item;getFoodComponent()Lnet/minecraft/item/FoodComponent;
-
getDrinkSound
public SoundEvent getDrinkSound()
- Mappings:
Namespace Name Mixin selector official ag_Lbpn;ag_()Laev;intermediary method_21831Lnet/minecraft/class_1792;method_21831()Lnet/minecraft/class_3414;named getDrinkSoundLnet/minecraft/item/Item;getDrinkSound()Lnet/minecraft/sound/SoundEvent;
-
getEatSound
public SoundEvent getEatSound()
- Mappings:
Namespace Name Mixin selector official hLbpn;h()Laev;intermediary method_21830Lnet/minecraft/class_1792;method_21830()Lnet/minecraft/class_3414;named getEatSoundLnet/minecraft/item/Item;getEatSound()Lnet/minecraft/sound/SoundEvent;
-
isFireproof
public boolean isFireproof()
- Mappings:
Namespace Name Mixin selector official wLbpn;w()Zintermediary method_24358Lnet/minecraft/class_1792;method_24358()Znamed isFireproofLnet/minecraft/item/Item;isFireproof()Z
-
damage
public boolean damage(DamageSource source)
- Mappings:
Namespace Name Mixin selector official aLbpn;a(Larv;)Zintermediary method_24357Lnet/minecraft/class_1792;method_24357(Lnet/minecraft/class_1282;)Znamed damageLnet/minecraft/item/Item;damage(Lnet/minecraft/entity/damage/DamageSource;)Z
-
getEquipSound
@Nullable public @Nullable SoundEvent getEquipSound()
- Mappings:
Namespace Name Mixin selector official gLbpn;g()Laev;intermediary method_31570Lnet/minecraft/class_1792;method_31570()Lnet/minecraft/class_3414;named getEquipSoundLnet/minecraft/item/Item;getEquipSound()Lnet/minecraft/sound/SoundEvent;
-
canBeNested
public boolean canBeNested()
- 返回:
- true if the item can be placed inside of shulker boxes or bundles.
- Mappings:
Namespace Name Mixin selector official fLbpn;f()Zintermediary method_31568Lnet/minecraft/class_1792;method_31568()Znamed canBeNestedLnet/minecraft/item/Item;canBeNested()Z
-
-