Package net.minecraft.item
Class ItemUsageContext
java.lang.Object
net.minecraft.item.ItemUsageContext
- Direct Known Subclasses:
ItemPlacementContext
- Mappings:
Namespace Name named net/minecraft/item/ItemUsageContextintermediary net/minecraft/class_1838official def
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionItemUsageContext(PlayerEntity player, Hand hand, BlockHitResult hit) protectedItemUsageContext(World world, @Nullable PlayerEntity player, Hand hand, ItemStack stack, BlockHitResult hit) -
Method Summary
Modifier and TypeMethodDescriptiongetHand()protected final BlockHitResultReturns the horizontal facing direction of the player.floatgetSide()getStack()getWorld()booleanboolean
-
Field Details
-
player
- Mappings:
Namespace Name Mixin selector named playerLnet/minecraft/item/ItemUsageContext;player:Lnet/minecraft/entity/player/PlayerEntity;intermediary field_8942Lnet/minecraft/class_1838;field_8942:Lnet/minecraft/class_1657;official aLdef;a:Lcsi;
-
hand
- Mappings:
Namespace Name Mixin selector named handLnet/minecraft/item/ItemUsageContext;hand:Lnet/minecraft/util/Hand;intermediary field_19176Lnet/minecraft/class_1838;field_19176:Lnet/minecraft/class_1268;official bLdef;b:Lbvb;
-
hit
- Mappings:
Namespace Name Mixin selector named hitLnet/minecraft/item/ItemUsageContext;hit:Lnet/minecraft/util/hit/BlockHitResult;intermediary field_17543Lnet/minecraft/class_1838;field_17543:Lnet/minecraft/class_3965;official cLdef;c:Lffy;
-
world
- Mappings:
Namespace Name Mixin selector named worldLnet/minecraft/item/ItemUsageContext;world:Lnet/minecraft/world/World;intermediary field_8945Lnet/minecraft/class_1838;field_8945:Lnet/minecraft/class_1937;official dLdef;d:Ldkj;
-
stack
- Mappings:
Namespace Name Mixin selector named stackLnet/minecraft/item/ItemUsageContext;stack:Lnet/minecraft/item/ItemStack;intermediary field_8941Lnet/minecraft/class_1838;field_8941:Lnet/minecraft/class_1799;official eLdef;e:Ldak;
-
-
Constructor Details
-
ItemUsageContext
- 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;)Vintermediary <init>Lnet/minecraft/class_1838;<init>(Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;Lnet/minecraft/class_3965;)Vofficial <init>Ldef;<init>(Lcsi;Lbvb;Lffy;)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;)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;)Vofficial <init>Ldef;<init>(Ldkj;Lcsi;Lbvb;Ldak;Lffy;)V
-
-
Method Details
-
getHitResult
- Mappings:
Namespace Name Mixin selector named getHitResultLnet/minecraft/item/ItemUsageContext;getHitResult()Lnet/minecraft/util/hit/BlockHitResult;intermediary method_30344Lnet/minecraft/class_1838;method_30344()Lnet/minecraft/class_3965;official jLdef;j()Lffy;
-
getBlockPos
- Mappings:
Namespace Name Mixin selector named getBlockPosLnet/minecraft/item/ItemUsageContext;getBlockPos()Lnet/minecraft/util/math/BlockPos;intermediary method_8037Lnet/minecraft/class_1838;method_8037()Lnet/minecraft/class_2338;official aLdef;a()Liw;
-
getSide
- Mappings:
Namespace Name Mixin selector named getSideLnet/minecraft/item/ItemUsageContext;getSide()Lnet/minecraft/util/math/Direction;intermediary method_8038Lnet/minecraft/class_1838;method_8038()Lnet/minecraft/class_2350;official kLdef;k()Ljc;
-
getHitPos
- Mappings:
Namespace Name Mixin selector named getHitPosLnet/minecraft/item/ItemUsageContext;getHitPos()Lnet/minecraft/util/math/Vec3d;intermediary method_17698Lnet/minecraft/class_1838;method_17698()Lnet/minecraft/class_243;official lLdef;l()Lfgc;
-
hitsInsideBlock
public boolean hitsInsideBlock()- Mappings:
Namespace Name Mixin selector named hitsInsideBlockLnet/minecraft/item/ItemUsageContext;hitsInsideBlock()Zintermediary method_17699Lnet/minecraft/class_1838;method_17699()Zofficial mLdef;m()Z
-
getStack
- Mappings:
Namespace Name Mixin selector named getStackLnet/minecraft/item/ItemUsageContext;getStack()Lnet/minecraft/item/ItemStack;intermediary method_8041Lnet/minecraft/class_1838;method_8041()Lnet/minecraft/class_1799;official nLdef;n()Ldak;
-
getPlayer
- Mappings:
Namespace Name Mixin selector named getPlayerLnet/minecraft/item/ItemUsageContext;getPlayer()Lnet/minecraft/entity/player/PlayerEntity;intermediary method_8036Lnet/minecraft/class_1838;method_8036()Lnet/minecraft/class_1657;official oLdef;o()Lcsi;
-
getHand
- Mappings:
Namespace Name Mixin selector named getHandLnet/minecraft/item/ItemUsageContext;getHand()Lnet/minecraft/util/Hand;intermediary method_20287Lnet/minecraft/class_1838;method_20287()Lnet/minecraft/class_1268;official pLdef;p()Lbvb;
-
getWorld
- Mappings:
Namespace Name Mixin selector named getWorldLnet/minecraft/item/ItemUsageContext;getWorld()Lnet/minecraft/world/World;intermediary method_8045Lnet/minecraft/class_1838;method_8045()Lnet/minecraft/class_1937;official qLdef;q()Ldkj;
-
getHorizontalPlayerFacing
Returns the horizontal facing direction of the player.- Returns:
- the horizontal facing direction of the player
- Implementation Requirements:
- If the player is
null, returnsDirection.NORTH. - Mappings:
Namespace Name Mixin selector named getHorizontalPlayerFacingLnet/minecraft/item/ItemUsageContext;getHorizontalPlayerFacing()Lnet/minecraft/util/math/Direction;intermediary method_8042Lnet/minecraft/class_1838;method_8042()Lnet/minecraft/class_2350;official gLdef;g()Ljc;
-
shouldCancelInteraction
public boolean shouldCancelInteraction()- Mappings:
Namespace Name Mixin selector named shouldCancelInteractionLnet/minecraft/item/ItemUsageContext;shouldCancelInteraction()Zintermediary method_8046Lnet/minecraft/class_1838;method_8046()Zofficial hLdef;h()Z
-
getPlayerYaw
public float getPlayerYaw()- Mappings:
Namespace Name Mixin selector named getPlayerYawLnet/minecraft/item/ItemUsageContext;getPlayerYaw()Fintermediary method_8044Lnet/minecraft/class_1838;method_8044()Fofficial iLdef;i()F
-