Package net.minecraft

Class class_9536

java.lang.Object
net.minecraft.item.Item
net.minecraft.class_9536
All Implemented Interfaces:
ItemConvertible, ToggleableFeature

public class class_9536 extends Item
Mappings:
Namespace Name
official cvf
intermediary net/minecraft/class_9536
named net/minecraft/class_9536
  • Constructor Details

    • class_9536

      public class_9536(Item.Settings settings)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcuc;<init>(Lcuc$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

    • canMine

      public boolean canMine(BlockState state, World world, BlockPos pos, PlayerEntity miner)
      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:
      canMine in class Item
      Returns:
      whether a player can break a block while holding the item
      Mappings:
      Namespace Name Mixin selector
      official a Lcuc;a(Ldtc;Ldca;Lir;Lcly;)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
    • postHit

      public boolean postHit(ItemStack stack, LivingEntity target, LivingEntity attacker)
      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:
      postHit in class Item
      Returns:
      whether the item's use stat should be incremented
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lcuc;a(Lcuh;Lbso;Lbso;)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
    • method_59060

      public static AttributeModifiersComponent method_59060(int int2, float float2)
      Mappings:
      Namespace Name Mixin selector
      official a Lcvf;a(IF)Lcxl;
      intermediary method_59060 Lnet/minecraft/class_9536;method_59060(IF)Lnet/minecraft/class_9285;
      named method_59060 Lnet/minecraft/class_9536;method_59060(IF)Lnet/minecraft/component/type/AttributeModifiersComponent;
    • method_59062

      private static float method_59062(World world)
      Mappings:
      Namespace Name Mixin selector
      official a Lcvf;a(Ldca;)F
      intermediary method_59062 Lnet/minecraft/class_9536;method_59062(Lnet/minecraft/class_1937;)F
      named method_59062 Lnet/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 a Lcvf;a(Ldca;Lcly;Lir;Lavq;)V
      intermediary method_59065 Lnet/minecraft/class_9536;method_59065(Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_2338;Lnet/minecraft/class_3419;)V
      named method_59065 Lnet/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

      public static void method_59063(World world, Entity entity)
      Mappings:
      Namespace Name Mixin selector
      official a Lcvf;a(Ldca;Lbrv;)V
      intermediary method_59063 Lnet/minecraft/class_9536;method_59063(Lnet/minecraft/class_1937;Lnet/minecraft/class_1297;)V
      named method_59063 Lnet/minecraft/class_9536;method_59063(Lnet/minecraft/world/World;Lnet/minecraft/entity/Entity;)V
    • method_59064

      public static void method_59064(World world, Entity entity, SoundCategory soundCategory)
      Mappings:
      Namespace Name Mixin selector
      official a Lcvf;a(Ldca;Lbrv;Lavq;)V
      intermediary method_59064 Lnet/minecraft/class_9536;method_59064(Lnet/minecraft/class_1937;Lnet/minecraft/class_1297;Lnet/minecraft/class_3419;)V
      named method_59064 Lnet/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 a Lcvf;a(Lcyf;Lcuh;Ldtc;)Lbqa;
      intermediary method_59061 Lnet/minecraft/class_9536;method_59061(Lnet/minecraft/class_1838;Lnet/minecraft/class_1799;Lnet/minecraft/class_2680;)Lnet/minecraft/class_1269;
      named method_59061 Lnet/minecraft/class_9536;method_59061(Lnet/minecraft/item/ItemUsageContext;Lnet/minecraft/item/ItemStack;Lnet/minecraft/block/BlockState;)Lnet/minecraft/util/ActionResult;
    • 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().

      Overrides:
      useOnBlock in class Item
      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 Lcuc;a(Lcyf;)Lbqa;
      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;