Package net.minecraft
Class class_9527
java.lang.Object
net.minecraft.item.Item
net.minecraft.class_9527
- All Implemented Interfaces:
ItemConvertible,ToggleableFeature
- Mappings:
Namespace Name official ctxintermediary net/minecraft/class_9527named net/minecraft/class_9527
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.item.Item
Item.Settings -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intFields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_ID, ATTACK_SPEED_MODIFIER_ID, BLOCK_ITEMS, DEFAULT_MAX_COUNT, ITEM_BAR_STEPS, MAX_MAX_COUNTFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinishUsing(ItemStack stack, World world, LivingEntity user) Called when an entity finishes using the item, such as eating food or drinking a potion.voidinventoryTick(ItemStack stack, World world, Entity entity, int slot, boolean selected) Called on both the client and the server every tick if the item is in the player's inventory.Methods inherited from class net.minecraft.item.Item
appendTooltip, asItem, byRawId, canBeNested, canMine, canRepair, fromBlock, getAttributeModifiers, getBonusAttackDamage, getBreakSound, getComponents, getDefaultStack, getDrinkSound, getEnchantability, getItemBarColor, getItemBarStep, getMaxCount, getMaxUseTime, getMiningSpeed, getName, getName, getOrCreateTranslationKey, getRawId, getRecipeRemainder, getRegistryEntry, getRequiredFeatures, getTooltipData, getTranslationKey, getTranslationKey, getUseAction, hasGlint, hasRecipeRemainder, isCorrectForDrops, isEnchantable, isItemBarVisible, isNetworkSynced, isUsedOnRelease, method_59036, method_59037, onClicked, onCraft, onCraftByPlayer, onItemEntityDestroyed, onStackClicked, onStoppedUsing, postHit, postMine, postProcessComponents, raycast, toString, usageTick, use, useOnBlock, useOnEntityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
field_50588
public static final int field_50588- See Also:
- Mappings:
Namespace Name Mixin selector official aLctx;a:Iintermediary field_50588Lnet/minecraft/class_9527;field_50588:Inamed field_50588Lnet/minecraft/class_9527;field_50588:I
-
field_50589
public static final int field_50589- See Also:
- Mappings:
Namespace Name Mixin selector official bLctx;b:Iintermediary field_50589Lnet/minecraft/class_9527;field_50589:Inamed field_50589Lnet/minecraft/class_9527;field_50589:I
-
field_50590
public static final int field_50590- See Also:
- Mappings:
Namespace Name Mixin selector official cLctx;c:Iintermediary field_50590Lnet/minecraft/class_9527;field_50590:Inamed field_50590Lnet/minecraft/class_9527;field_50590:I
-
-
Constructor Details
-
class_9527
- Mappings:
Namespace Name Mixin selector official <init>Lcuc;<init>(Lcuc$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
-
-
Method Details
-
finishUsing
Called when an entity finishes using the item, such as eating food or drinking a potion. This method handles eating food by default.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.usermight not be a player in some cases. For example, this occurs when a fox eats food or when a wandering trader drinks milk.- Overrides:
finishUsingin classItem- Returns:
- the new item stack after using the item
- Mappings:
Namespace Name Mixin selector official aLcuc;a(Lcuh;Ldca;Lbso;)Lcuh;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;
-
inventoryTick
Called on both the client and the server every tick if the item is in the player's inventory.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.- Overrides:
inventoryTickin classItem- Parameters:
entity- the entity holding the item; usually a playerselected- whether the item is in the selected hotbar slot- Mappings:
Namespace Name Mixin selector official aLcuc;a(Lcuh;Ldca;Lbrv;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
-