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 pLevel, Player pPlayer, InteractionHand pHand, ItemStack pItemStack, BlockHitResult pHitResult) -
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 pLevel, @Nullable Player pPlayer, InteractionHand pHand, ItemStack pItemStack, BlockHitResult pHitResult)
-
-
Method Details
-
at
-
getClickedPos
- Overrides:
getClickedPos
in classUseOnContext
-
canPlace
public boolean canPlace() -
replacingClickedOnBlock
public boolean replacingClickedOnBlock() -
getNearestLookingDirection
-
getNearestLookingVerticalDirection
-
getNearestLookingDirections
-