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
-
Constructor Summary
ConstructorDescriptionBlockPlaceContext(Player p_43631_, InteractionHand p_43632_, ItemStack p_43633_, BlockHitResult p_43634_)
BlockPlaceContext(UseOnContext p_43636_)
BlockPlaceContext(Level p_43638_, Player p_43639_, InteractionHand p_43640_, ItemStack p_43641_, BlockHitResult p_43642_)
-
Method Summary
Modifier and TypeMethodDescriptionstatic BlockPlaceContext
at(BlockPlaceContext p_43645_, BlockPos p_43646_, Direction p_43647_)
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 p_43631_, InteractionHand p_43632_, ItemStack p_43633_, BlockHitResult p_43634_) -
BlockPlaceContext
-
BlockPlaceContext
public BlockPlaceContext(Level p_43638_, @Nullable Player p_43639_, InteractionHand p_43640_, ItemStack p_43641_, BlockHitResult p_43642_)
-
-
Method Details
-
at
public static BlockPlaceContext at(BlockPlaceContext p_43645_, BlockPos p_43646_, Direction p_43647_) -
getClickedPos
- Overrides:
getClickedPos
in classUseOnContext
-
canPlace
public boolean canPlace() -
replacingClickedOnBlock
public boolean replacingClickedOnBlock() -
getNearestLookingDirection
-
getNearestLookingVerticalDirection
-
getNearestLookingDirections
-