Package net.minecraft
Class class_9536
java.lang.Object
net.minecraft.item.Item
net.minecraft.class_9536
- All Implemented Interfaces:
ItemConvertible,ToggleableFeature
- Mappings:
Namespace Name official cvfintermediary net/minecraft/class_9536named net/minecraft/class_9536
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.item.Item
Item.Settings -
Field Summary
Fields 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 TypeMethodDescriptionbooleancanMine(BlockState state, World world, BlockPos pos, PlayerEntity miner) Returns whether a player can break a block while holding the item.static AttributeModifiersComponentmethod_59060(int int2, float float2) private static ActionResultmethod_59061(ItemUsageContext itemUsageContext, ItemStack itemStack, BlockState blockState) private static floatmethod_59062(World world) static voidmethod_59063(World world, Entity entity) static voidmethod_59064(World world, Entity entity, SoundCategory soundCategory) static voidmethod_59065(World world, @Nullable PlayerEntity playerEntity, BlockPos blockPos, SoundCategory soundCategory) booleanpostHit(ItemStack stack, LivingEntity target, LivingEntity attacker) Called on the server when the item is used to hit an entity.useOnBlock(ItemUsageContext context) Called when an item is used on a block.Methods inherited from class net.minecraft.item.Item
appendTooltip, asItem, byRawId, canBeNested, canRepair, finishUsing, 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, inventoryTick, isCorrectForDrops, isEnchantable, isItemBarVisible, isNetworkSynced, isUsedOnRelease, method_59036, method_59037, onClicked, onCraft, onCraftByPlayer, onItemEntityDestroyed, onStackClicked, onStoppedUsing, postMine, postProcessComponents, raycast, toString, usageTick, use, 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
-
Constructor Details
-
class_9536
- 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
-
canMine
Returns whether a player can break a block while holding the item.This is to check whether the player can start breaking the block in the first place; this does not check if the item is a correct tool to mine the block. Melee weapons should override this to return
false, unless it is also intended to be used as a tool.- Overrides:
canMinein classItem- Returns:
- whether a player can break a block while holding the item
- Mappings:
Namespace Name Mixin selector official aLcuc;a(Ldtc;Ldca;Lir;Lcly;)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
-
postHit
Called on the server when the item is used to hit an entity.Tools and melee weapons should override this to damage the stack.
- Overrides:
postHitin classItem- Returns:
- whether the item's use stat should be incremented
- See Also:
- Mappings:
Namespace Name Mixin selector official aLcuc;a(Lcuh;Lbso;Lbso;)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
-
method_59060
- Mappings:
Namespace Name Mixin selector official aLcvf;a(IF)Lcxl;intermediary method_59060Lnet/minecraft/class_9536;method_59060(IF)Lnet/minecraft/class_9285;named method_59060Lnet/minecraft/class_9536;method_59060(IF)Lnet/minecraft/component/type/AttributeModifiersComponent;
-
method_59062
- Mappings:
Namespace Name Mixin selector official aLcvf;a(Ldca;)Fintermediary method_59062Lnet/minecraft/class_9536;method_59062(Lnet/minecraft/class_1937;)Fnamed method_59062Lnet/minecraft/class_9536;method_59062(Lnet/minecraft/world/World;)F
-
method_59065
public static void method_59065(World world, @Nullable @Nullable PlayerEntity playerEntity, BlockPos blockPos, SoundCategory soundCategory) - Mappings:
Namespace Name Mixin selector official aLcvf;a(Ldca;Lcly;Lir;Lavq;)Vintermediary method_59065Lnet/minecraft/class_9536;method_59065(Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_2338;Lnet/minecraft/class_3419;)Vnamed method_59065Lnet/minecraft/class_9536;method_59065(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/sound/SoundCategory;)V
-
method_59063
- Mappings:
Namespace Name Mixin selector official aLcvf;a(Ldca;Lbrv;)Vintermediary method_59063Lnet/minecraft/class_9536;method_59063(Lnet/minecraft/class_1937;Lnet/minecraft/class_1297;)Vnamed method_59063Lnet/minecraft/class_9536;method_59063(Lnet/minecraft/world/World;Lnet/minecraft/entity/Entity;)V
-
method_59064
- Mappings:
Namespace Name Mixin selector official aLcvf;a(Ldca;Lbrv;Lavq;)Vintermediary method_59064Lnet/minecraft/class_9536;method_59064(Lnet/minecraft/class_1937;Lnet/minecraft/class_1297;Lnet/minecraft/class_3419;)Vnamed method_59064Lnet/minecraft/class_9536;method_59064(Lnet/minecraft/world/World;Lnet/minecraft/entity/Entity;Lnet/minecraft/sound/SoundCategory;)V
-
method_59061
private static ActionResult method_59061(ItemUsageContext itemUsageContext, ItemStack itemStack, BlockState blockState) - Mappings:
Namespace Name Mixin selector official aLcvf;a(Lcyf;Lcuh;Ldtc;)Lbqa;intermediary method_59061Lnet/minecraft/class_9536;method_59061(Lnet/minecraft/class_1838;Lnet/minecraft/class_1799;Lnet/minecraft/class_2680;)Lnet/minecraft/class_1269;named method_59061Lnet/minecraft/class_9536;method_59061(Lnet/minecraft/item/ItemUsageContext;Lnet/minecraft/item/ItemStack;Lnet/minecraft/block/BlockState;)Lnet/minecraft/util/ActionResult;
-
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().- Overrides:
useOnBlockin classItem- 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 aLcuc;a(Lcyf;)Lbqa;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;
-