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 player, InteractionHand hand, ItemStack itemStack, BlockHitResult hitResult) BlockPlaceContext(UseOnContext context) BlockPlaceContext(Level level, Player player, InteractionHand hand, ItemStack itemStack, BlockHitResult hitResult) -
Method Summary
Modifier and TypeMethodDescriptionstatic BlockPlaceContextat(BlockPlaceContext context, BlockPos pos, Direction direction) booleancanPlace()booleanMethods 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 player, InteractionHand hand, ItemStack itemStack, BlockHitResult hitResult) -
BlockPlaceContext
-
BlockPlaceContext
public BlockPlaceContext(Level level, @Nullable Player player, InteractionHand hand, ItemStack itemStack, BlockHitResult hitResult)
-
-
Method Details
-
at
-
getClickedPos
- Overrides:
getClickedPosin classUseOnContext
-
canPlace
public boolean canPlace() -
replacingClickedOnBlock
public boolean replacingClickedOnBlock() -
getNearestLookingDirection
-
getNearestLookingVerticalDirection
-
getNearestLookingDirections
-