Package net.minecraft.item
Class ItemUsageContext
java.lang.Object
net.minecraft.item.ItemUsageContext
- Direct Known Subclasses:
ItemPlacementContext
public class ItemUsageContext extends Object
- Mappings:
Namespace Name official bpxintermediary net/minecraft/class_1838named net/minecraft/item/ItemUsageContext
-
Field Summary
Fields Modifier and Type Field Description private Handhandprivate BlockHitResulthitprivate PlayerEntityplayerprivate ItemStackstackprivate Worldworld -
Constructor Summary
Constructors Modifier Constructor Description ItemUsageContext(PlayerEntity player, Hand hand, BlockHitResult hit)protectedItemUsageContext(World world, PlayerEntity player, Hand hand, ItemStack stack, BlockHitResult hit) -
Method Summary
Modifier and Type Method Description BlockPosgetBlockPos()HandgetHand()Vec3dgetHitPos()protected BlockHitResultgetHitResult()PlayerEntitygetPlayer()DirectiongetPlayerFacing()floatgetPlayerYaw()DirectiongetSide()ItemStackgetStack()WorldgetWorld()booleanhitsInsideBlock()booleanshouldCancelInteraction()
-
Field Details
-
player
- Mappings:
Namespace Name Mixin selector official aLbpx;a:Lbhl;intermediary field_8942Lnet/minecraft/class_1838;field_8942:Lnet/minecraft/class_1657;named playerLnet/minecraft/item/ItemUsageContext;player:Lnet/minecraft/entity/player/PlayerEntity;
-
hand
- Mappings:
Namespace Name Mixin selector official bLbpx;b:Lapp;intermediary field_19176Lnet/minecraft/class_1838;field_19176:Lnet/minecraft/class_1268;named handLnet/minecraft/item/ItemUsageContext;hand:Lnet/minecraft/util/Hand;
-
hit
- Mappings:
Namespace Name Mixin selector official cLbpx;c:Ldiq;intermediary field_17543Lnet/minecraft/class_1838;field_17543:Lnet/minecraft/class_3965;named hitLnet/minecraft/item/ItemUsageContext;hit:Lnet/minecraft/util/hit/BlockHitResult;
-
world
- Mappings:
Namespace Name Mixin selector official dLbpx;d:Lbtv;intermediary field_8945Lnet/minecraft/class_1838;field_8945:Lnet/minecraft/class_1937;named worldLnet/minecraft/item/ItemUsageContext;world:Lnet/minecraft/world/World;
-
stack
- Mappings:
Namespace Name Mixin selector official eLbpx;e:Lbnv;intermediary field_8941Lnet/minecraft/class_1838;field_8941:Lnet/minecraft/class_1799;named stackLnet/minecraft/item/ItemUsageContext;stack:Lnet/minecraft/item/ItemStack;
-
-
Constructor Details
-
ItemUsageContext
- Mappings:
Namespace Name Mixin selector official <init>Lbpx;<init>(Lbhl;Lapp;Ldiq;)Vintermediary <init>Lnet/minecraft/class_1838;<init>(Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;Lnet/minecraft/class_3965;)Vnamed <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;)Vintermediary <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;)Vnamed <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
- Mappings:
Namespace Name Mixin selector official jLbpx;j()Ldiq;intermediary method_30344Lnet/minecraft/class_1838;method_30344()Lnet/minecraft/class_3965;named getHitResultLnet/minecraft/item/ItemUsageContext;getHitResult()Lnet/minecraft/util/hit/BlockHitResult;
-
getBlockPos
- Mappings:
Namespace Name Mixin selector official aLbpx;a()Lfx;intermediary method_8037Lnet/minecraft/class_1838;method_8037()Lnet/minecraft/class_2338;named getBlockPosLnet/minecraft/item/ItemUsageContext;getBlockPos()Lnet/minecraft/util/math/BlockPos;
-
getSide
- Mappings:
Namespace Name Mixin selector official kLbpx;k()Lgc;intermediary method_8038Lnet/minecraft/class_1838;method_8038()Lnet/minecraft/class_2350;named getSideLnet/minecraft/item/ItemUsageContext;getSide()Lnet/minecraft/util/math/Direction;
-
getHitPos
- Mappings:
Namespace Name Mixin selector official lLbpx;l()Ldiu;intermediary method_17698Lnet/minecraft/class_1838;method_17698()Lnet/minecraft/class_243;named getHitPosLnet/minecraft/item/ItemUsageContext;getHitPos()Lnet/minecraft/util/math/Vec3d;
-
hitsInsideBlock
public boolean hitsInsideBlock()- Mappings:
Namespace Name Mixin selector official mLbpx;m()Zintermediary method_17699Lnet/minecraft/class_1838;method_17699()Znamed hitsInsideBlockLnet/minecraft/item/ItemUsageContext;hitsInsideBlock()Z
-
getStack
- Mappings:
Namespace Name Mixin selector official nLbpx;n()Lbnv;intermediary method_8041Lnet/minecraft/class_1838;method_8041()Lnet/minecraft/class_1799;named getStackLnet/minecraft/item/ItemUsageContext;getStack()Lnet/minecraft/item/ItemStack;
-
getPlayer
- Mappings:
Namespace Name Mixin selector official oLbpx;o()Lbhl;intermediary method_8036Lnet/minecraft/class_1838;method_8036()Lnet/minecraft/class_1657;named getPlayerLnet/minecraft/item/ItemUsageContext;getPlayer()Lnet/minecraft/entity/player/PlayerEntity;
-
getHand
- Mappings:
Namespace Name Mixin selector official pLbpx;p()Lapp;intermediary method_20287Lnet/minecraft/class_1838;method_20287()Lnet/minecraft/class_1268;named getHandLnet/minecraft/item/ItemUsageContext;getHand()Lnet/minecraft/util/Hand;
-
getWorld
- Mappings:
Namespace Name Mixin selector official qLbpx;q()Lbtv;intermediary method_8045Lnet/minecraft/class_1838;method_8045()Lnet/minecraft/class_1937;named getWorldLnet/minecraft/item/ItemUsageContext;getWorld()Lnet/minecraft/world/World;
-
getPlayerFacing
- Mappings:
Namespace Name Mixin selector official gLbpx;g()Lgc;intermediary method_8042Lnet/minecraft/class_1838;method_8042()Lnet/minecraft/class_2350;named getPlayerFacingLnet/minecraft/item/ItemUsageContext;getPlayerFacing()Lnet/minecraft/util/math/Direction;
-
shouldCancelInteraction
public boolean shouldCancelInteraction()- Mappings:
Namespace Name Mixin selector official hLbpx;h()Zintermediary method_8046Lnet/minecraft/class_1838;method_8046()Znamed shouldCancelInteractionLnet/minecraft/item/ItemUsageContext;shouldCancelInteraction()Z
-
getPlayerYaw
public float getPlayerYaw()- Mappings:
Namespace Name Mixin selector official iLbpx;i()Fintermediary method_8044Lnet/minecraft/class_1838;method_8044()Fnamed getPlayerYawLnet/minecraft/item/ItemUsageContext;getPlayerYaw()F
-