Package net.minecraft.item
Class ItemPlacementContext
java.lang.Object
net.minecraft.item.ItemUsageContext
net.minecraft.item.ItemPlacementContext
- Direct Known Subclasses:
AutomaticItemPlacementContext
public class ItemPlacementContext extends ItemUsageContext
- Mappings:
Namespace Name official bpv
intermediary net/minecraft/class_1750
named net/minecraft/item/ItemPlacementContext
-
Field Summary
Fields Modifier and Type Field Description protected boolean
canReplaceExisting
private BlockPos
placementPos
-
Constructor Summary
Constructors Modifier Constructor Description ItemPlacementContext(PlayerEntity player, Hand hand, ItemStack stack, BlockHitResult hitResult)
ItemPlacementContext(ItemUsageContext context)
protected
ItemPlacementContext(World world, PlayerEntity player, Hand hand, ItemStack stack, BlockHitResult hit)
-
Method Summary
Modifier and Type Method Description boolean
canPlace()
boolean
canReplaceExisting()
BlockPos
getBlockPos()
Direction[]
getPlacementDirections()
Direction
getPlayerLookDirection()
Direction
getVerticalPlayerLookDirection()
static ItemPlacementContext
offset(ItemPlacementContext context, BlockPos pos, Direction side)
Methods inherited from class net.minecraft.item.ItemUsageContext
getHand, getHitPos, getHitResult, getPlayer, getPlayerFacing, getPlayerYaw, getSide, getStack, getWorld, hitsInsideBlock, shouldCancelInteraction
-
Field Details
-
placementPos
- Mappings:
Namespace Name Mixin selector official b
Lbpv;b:Lfx;
intermediary field_7903
Lnet/minecraft/class_1750;field_7903:Lnet/minecraft/class_2338;
named placementPos
Lnet/minecraft/item/ItemPlacementContext;placementPos:Lnet/minecraft/util/math/BlockPos;
-
canReplaceExisting
protected boolean canReplaceExisting- Mappings:
Namespace Name Mixin selector official a
Lbpv;a:Z
intermediary field_7904
Lnet/minecraft/class_1750;field_7904:Z
named canReplaceExisting
Lnet/minecraft/item/ItemPlacementContext;canReplaceExisting:Z
-
-
Constructor Details
-
ItemPlacementContext
public ItemPlacementContext(PlayerEntity player, Hand hand, ItemStack stack, BlockHitResult hitResult)- Mappings:
Namespace Name Mixin selector official <init>
Lbpv;<init>(Lbhl;Lapp;Lbnv;Ldiq;)V
intermediary <init>
Lnet/minecraft/class_1750;<init>(Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;Lnet/minecraft/class_1799;Lnet/minecraft/class_3965;)V
named <init>
Lnet/minecraft/item/ItemPlacementContext;<init>(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/item/ItemStack;Lnet/minecraft/util/hit/BlockHitResult;)V
-
ItemPlacementContext
- Mappings:
Namespace Name Mixin selector official <init>
Lbpv;<init>(Lbpx;)V
intermediary <init>
Lnet/minecraft/class_1750;<init>(Lnet/minecraft/class_1838;)V
named <init>
Lnet/minecraft/item/ItemPlacementContext;<init>(Lnet/minecraft/item/ItemUsageContext;)V
-
ItemPlacementContext
protected ItemPlacementContext(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
-
offset
public static ItemPlacementContext offset(ItemPlacementContext context, BlockPos pos, Direction side)- Mappings:
Namespace Name Mixin selector official a
Lbpv;a(Lbpv;Lfx;Lgc;)Lbpv;
intermediary method_16355
Lnet/minecraft/class_1750;method_16355(Lnet/minecraft/class_1750;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)Lnet/minecraft/class_1750;
named offset
Lnet/minecraft/item/ItemPlacementContext;offset(Lnet/minecraft/item/ItemPlacementContext;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Lnet/minecraft/item/ItemPlacementContext;
-
getBlockPos
- Overrides:
getBlockPos
in classItemUsageContext
- 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;
-
canPlace
public boolean canPlace()- Mappings:
Namespace Name Mixin selector official b
Lbpv;b()Z
intermediary method_7716
Lnet/minecraft/class_1750;method_7716()Z
named canPlace
Lnet/minecraft/item/ItemPlacementContext;canPlace()Z
-
canReplaceExisting
public boolean canReplaceExisting()- Mappings:
Namespace Name Mixin selector official c
Lbpv;c()Z
intermediary method_7717
Lnet/minecraft/class_1750;method_7717()Z
named canReplaceExisting
Lnet/minecraft/item/ItemPlacementContext;canReplaceExisting()Z
-
getPlayerLookDirection
- Mappings:
Namespace Name Mixin selector official d
Lbpv;d()Lgc;
intermediary method_7715
Lnet/minecraft/class_1750;method_7715()Lnet/minecraft/class_2350;
named getPlayerLookDirection
Lnet/minecraft/item/ItemPlacementContext;getPlayerLookDirection()Lnet/minecraft/util/math/Direction;
-
getVerticalPlayerLookDirection
- Mappings:
Namespace Name Mixin selector official e
Lbpv;e()Lgc;
intermediary method_32760
Lnet/minecraft/class_1750;method_32760()Lnet/minecraft/class_2350;
named getVerticalPlayerLookDirection
Lnet/minecraft/item/ItemPlacementContext;getVerticalPlayerLookDirection()Lnet/minecraft/util/math/Direction;
-
getPlacementDirections
- Mappings:
Namespace Name Mixin selector official f
Lbpv;f()[Lgc;
intermediary method_7718
Lnet/minecraft/class_1750;method_7718()[Lnet/minecraft/class_2350;
named getPlacementDirections
Lnet/minecraft/item/ItemPlacementContext;getPlacementDirections()[Lnet/minecraft/util/math/Direction;
-