Class ItemUsageContext

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

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

    • player

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

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

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

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

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

    • ItemUsageContext

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

      protected ItemUsageContext​(World world, @Nullable PlayerEntity player, Hand hand, ItemStack stack, BlockHitResult hit)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbpx;<init>(Lbtv;Lbhl;Lapp;Lbnv;Ldiq;)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
      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
  • Method Details

    • getHitResult

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

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

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

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

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

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

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

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

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

      public Direction getPlayerFacing()
      Mappings:
      Namespace Name Mixin selector
      official g Lbpx;g()Lgc;
      intermediary method_8042 Lnet/minecraft/class_1838;method_8042()Lnet/minecraft/class_2350;
      named getPlayerFacing Lnet/minecraft/item/ItemUsageContext;getPlayerFacing()Lnet/minecraft/util/math/Direction;
    • shouldCancelInteraction

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

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