Package net.minecraft.item
Class BlockItemUseContext
java.lang.Object
net.minecraft.item.ItemUseContext
net.minecraft.item.BlockItemUseContext
- Direct Known Subclasses:
DirectionalPlaceContext
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBlockItemUseContext
(PlayerEntity p_i241237_1_, Hand p_i241237_2_, ItemStack p_i241237_3_, BlockRayTraceResult p_i241237_4_) BlockItemUseContext
(ItemUseContext p_i47813_1_) BlockItemUseContext
(World p_i50056_1_, PlayerEntity p_i50056_2_, Hand p_i50056_3_, ItemStack p_i50056_4_, BlockRayTraceResult p_i50056_5_) -
Method Summary
Modifier and TypeMethodDescriptionstatic BlockItemUseContext
at
(BlockItemUseContext p_221536_0_, BlockPos p_221536_1_, Direction p_221536_2_) boolean
canPlace()
boolean
Methods inherited from class net.minecraft.item.ItemUseContext
getClickedFace, getClickLocation, getHand, getHitResult, getHorizontalDirection, getItemInHand, getLevel, getPlayer, getRotation, isInside, isSecondaryUseActive
-
Field Details
-
relativePos
-
replaceClicked
protected boolean replaceClicked
-
-
Constructor Details
-
BlockItemUseContext
public BlockItemUseContext(PlayerEntity p_i241237_1_, Hand p_i241237_2_, ItemStack p_i241237_3_, BlockRayTraceResult p_i241237_4_) -
BlockItemUseContext
-
BlockItemUseContext
public BlockItemUseContext(World p_i50056_1_, @Nullable PlayerEntity p_i50056_2_, Hand p_i50056_3_, ItemStack p_i50056_4_, BlockRayTraceResult p_i50056_5_)
-
-
Method Details
-
at
public static BlockItemUseContext at(BlockItemUseContext p_221536_0_, BlockPos p_221536_1_, Direction p_221536_2_) -
getClickedPos
- Overrides:
getClickedPos
in classItemUseContext
-
canPlace
public boolean canPlace() -
replacingClickedOnBlock
public boolean replacingClickedOnBlock() -
getNearestLookingDirection
-
getNearestLookingDirections
-