Package net.minecraft.world.item.context
Class BlockPlaceContext
java.lang.Object
net.minecraft.world.item.context.UseOnContext
net.minecraft.world.item.context.BlockPlaceContext
- Direct Known Subclasses:
DirectionalPlaceContext
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBlockPlaceContext
(Player pPlayer, InteractionHand pHand, ItemStack pItemStack, BlockHitResult pHitResult) BlockPlaceContext
(UseOnContext pContext) BlockPlaceContext
(Level p_43638_, Player p_43639_, InteractionHand p_43640_, ItemStack p_43641_, BlockHitResult p_43642_) -
Method Summary
Modifier and TypeMethodDescriptionstatic BlockPlaceContext
at
(BlockPlaceContext pContext, BlockPos pPos, Direction pDirection) boolean
canPlace()
boolean
Methods inherited from class net.minecraft.world.item.context.UseOnContext
getClickedFace, getClickLocation, getHand, getHitResult, getHorizontalDirection, getItemInHand, getLevel, getPlayer, getRotation, isInside, isSecondaryUseActive
-
Field Details
-
relativePos
-
replaceClicked
protected boolean replaceClicked
-
-
Constructor Details
-
BlockPlaceContext
public BlockPlaceContext(Player pPlayer, InteractionHand pHand, ItemStack pItemStack, BlockHitResult pHitResult) -
BlockPlaceContext
-
BlockPlaceContext
public BlockPlaceContext(Level p_43638_, @Nullable Player p_43639_, InteractionHand p_43640_, ItemStack p_43641_, BlockHitResult p_43642_)
-
-
Method Details
-
at
-
getClickedPos
- Overrides:
getClickedPos
in classUseOnContext
-
canPlace
public boolean canPlace() -
replacingClickedOnBlock
public boolean replacingClickedOnBlock() -
getNearestLookingDirection
-
getNearestLookingVerticalDirection
-
getNearestLookingDirections
-