Class ItemUsageContext

java.lang.Object
net.minecraft.item.ItemUsageContext
Direct Known Subclasses:
ItemPlacementContext

public class ItemUsageContext extends Object
Mappings:
Namespace Name
named net/minecraft/item/ItemUsageContext
intermediary net/minecraft/class_1838
official cyf
  • Field Details

    • player

      @Nullable private final @Nullable PlayerEntity player
      Mappings:
      Namespace Name Mixin selector
      named player Lnet/minecraft/item/ItemUsageContext;player:Lnet/minecraft/entity/player/PlayerEntity;
      intermediary field_8942 Lnet/minecraft/class_1838;field_8942:Lnet/minecraft/class_1657;
      official a Lcyf;a:Lcmx;
    • hand

      private final Hand hand
      Mappings:
      Namespace Name Mixin selector
      named hand Lnet/minecraft/item/ItemUsageContext;hand:Lnet/minecraft/util/Hand;
      intermediary field_19176 Lnet/minecraft/class_1838;field_19176:Lnet/minecraft/class_1268;
      official b Lcyf;b:Lbqq;
    • hit

      private final BlockHitResult hit
      Mappings:
      Namespace Name Mixin selector
      named hit Lnet/minecraft/item/ItemUsageContext;hit:Lnet/minecraft/util/hit/BlockHitResult;
      intermediary field_17543 Lnet/minecraft/class_1838;field_17543:Lnet/minecraft/class_3965;
      official c Lcyf;c:Lewy;
    • world

      private final World world
      Mappings:
      Namespace Name Mixin selector
      named world Lnet/minecraft/item/ItemUsageContext;world:Lnet/minecraft/world/World;
      intermediary field_8945 Lnet/minecraft/class_1838;field_8945:Lnet/minecraft/class_1937;
      official d Lcyf;d:Ldcw;
    • stack

      private final ItemStack stack
      Mappings:
      Namespace Name Mixin selector
      named stack Lnet/minecraft/item/ItemUsageContext;stack:Lnet/minecraft/item/ItemStack;
      intermediary field_8941 Lnet/minecraft/class_1838;field_8941:Lnet/minecraft/class_1799;
      official e Lcyf;e:Lcuq;
  • Constructor Details

    • ItemUsageContext

      public ItemUsageContext(PlayerEntity player, Hand hand, BlockHitResult hit)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/item/ItemUsageContext;<init>(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/util/hit/BlockHitResult;)V
      intermediary <init> Lnet/minecraft/class_1838;<init>(Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;Lnet/minecraft/class_3965;)V
      official <init> Lcyf;<init>(Lcmx;Lbqq;Lewy;)V
    • ItemUsageContext

      protected ItemUsageContext(World world, @Nullable @Nullable PlayerEntity player, Hand hand, ItemStack stack, BlockHitResult hit)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/item/ItemUsageContext;<init>(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/item/ItemStack;Lnet/minecraft/util/hit/BlockHitResult;)V
      intermediary <init> Lnet/minecraft/class_1838;<init>(Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;Lnet/minecraft/class_1799;Lnet/minecraft/class_3965;)V
      official <init> Lcyf;<init>(Ldcw;Lcmx;Lbqq;Lcuq;Lewy;)V
  • Method Details

    • getHitResult

      protected final BlockHitResult getHitResult()
      Mappings:
      Namespace Name Mixin selector
      named getHitResult Lnet/minecraft/item/ItemUsageContext;getHitResult()Lnet/minecraft/util/hit/BlockHitResult;
      intermediary method_30344 Lnet/minecraft/class_1838;method_30344()Lnet/minecraft/class_3965;
      official j Lcyf;j()Lewy;
    • getBlockPos

      public BlockPos getBlockPos()
      Mappings:
      Namespace Name Mixin selector
      named getBlockPos Lnet/minecraft/item/ItemUsageContext;getBlockPos()Lnet/minecraft/util/math/BlockPos;
      intermediary method_8037 Lnet/minecraft/class_1838;method_8037()Lnet/minecraft/class_2338;
      official a Lcyf;a()Ljd;
    • getSide

      public Direction getSide()
      Mappings:
      Namespace Name Mixin selector
      named getSide Lnet/minecraft/item/ItemUsageContext;getSide()Lnet/minecraft/util/math/Direction;
      intermediary method_8038 Lnet/minecraft/class_1838;method_8038()Lnet/minecraft/class_2350;
      official k Lcyf;k()Lji;
    • getHitPos

      public Vec3d getHitPos()
      Mappings:
      Namespace Name Mixin selector
      named getHitPos Lnet/minecraft/item/ItemUsageContext;getHitPos()Lnet/minecraft/util/math/Vec3d;
      intermediary method_17698 Lnet/minecraft/class_1838;method_17698()Lnet/minecraft/class_243;
      official l Lcyf;l()Lexc;
    • hitsInsideBlock

      public boolean hitsInsideBlock()
      Mappings:
      Namespace Name Mixin selector
      named hitsInsideBlock Lnet/minecraft/item/ItemUsageContext;hitsInsideBlock()Z
      intermediary method_17699 Lnet/minecraft/class_1838;method_17699()Z
      official m Lcyf;m()Z
    • getStack

      public ItemStack getStack()
      Mappings:
      Namespace Name Mixin selector
      named getStack Lnet/minecraft/item/ItemUsageContext;getStack()Lnet/minecraft/item/ItemStack;
      intermediary method_8041 Lnet/minecraft/class_1838;method_8041()Lnet/minecraft/class_1799;
      official n Lcyf;n()Lcuq;
    • getPlayer

      @Nullable public @Nullable PlayerEntity getPlayer()
      Mappings:
      Namespace Name Mixin selector
      named getPlayer Lnet/minecraft/item/ItemUsageContext;getPlayer()Lnet/minecraft/entity/player/PlayerEntity;
      intermediary method_8036 Lnet/minecraft/class_1838;method_8036()Lnet/minecraft/class_1657;
      official o Lcyf;o()Lcmx;
    • getHand

      public Hand getHand()
      Mappings:
      Namespace Name Mixin selector
      named getHand Lnet/minecraft/item/ItemUsageContext;getHand()Lnet/minecraft/util/Hand;
      intermediary method_20287 Lnet/minecraft/class_1838;method_20287()Lnet/minecraft/class_1268;
      official p Lcyf;p()Lbqq;
    • getWorld

      public World getWorld()
      Mappings:
      Namespace Name Mixin selector
      named getWorld Lnet/minecraft/item/ItemUsageContext;getWorld()Lnet/minecraft/world/World;
      intermediary method_8045 Lnet/minecraft/class_1838;method_8045()Lnet/minecraft/class_1937;
      official q Lcyf;q()Ldcw;
    • getHorizontalPlayerFacing

      public Direction getHorizontalPlayerFacing()
      Returns the horizontal facing direction of the player.
      Returns:
      the horizontal facing direction of the player
      Implementation Requirements:
      If the player is null, returns Direction.NORTH.
      Mappings:
      Namespace Name Mixin selector
      named getHorizontalPlayerFacing Lnet/minecraft/item/ItemUsageContext;getHorizontalPlayerFacing()Lnet/minecraft/util/math/Direction;
      intermediary method_8042 Lnet/minecraft/class_1838;method_8042()Lnet/minecraft/class_2350;
      official g Lcyf;g()Lji;
    • shouldCancelInteraction

      public boolean shouldCancelInteraction()
      Mappings:
      Namespace Name Mixin selector
      named shouldCancelInteraction Lnet/minecraft/item/ItemUsageContext;shouldCancelInteraction()Z
      intermediary method_8046 Lnet/minecraft/class_1838;method_8046()Z
      official h Lcyf;h()Z
    • getPlayerYaw

      public float getPlayerYaw()
      Mappings:
      Namespace Name Mixin selector
      named getPlayerYaw Lnet/minecraft/item/ItemUsageContext;getPlayerYaw()F
      intermediary method_8044 Lnet/minecraft/class_1838;method_8044()F
      official i Lcyf;i()F