Package net.minecraft.item
Class BlockItemUseContext
- java.lang.Object
-
- net.minecraft.item.ItemUseContext
-
- net.minecraft.item.BlockItemUseContext
-
- Direct Known Subclasses:
DirectionalPlaceContext
public class BlockItemUseContext extends ItemUseContext
-
-
Field Summary
Fields Modifier and Type Field Description private BlockPosrelativePosprotected booleanreplaceClicked
-
Constructor Summary
Constructors Constructor Description BlockItemUseContext(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BlockItemUseContextat(BlockItemUseContext p_221536_0_, BlockPos p_221536_1_, Direction p_221536_2_)booleancanPlace()BlockPosgetClickedPos()DirectiongetNearestLookingDirection()Direction[]getNearestLookingDirections()booleanreplacingClickedOnBlock()-
Methods inherited from class net.minecraft.item.ItemUseContext
getClickedFace, getClickLocation, getHand, getHitResult, getHorizontalDirection, getItemInHand, getLevel, getPlayer, getRotation, isInside, isSecondaryUseActive
-
-
-
-
Field Detail
-
relativePos
private final BlockPos relativePos
-
replaceClicked
protected boolean replaceClicked
-
-
Constructor Detail
-
BlockItemUseContext
public BlockItemUseContext(PlayerEntity p_i241237_1_, Hand p_i241237_2_, ItemStack p_i241237_3_, BlockRayTraceResult p_i241237_4_)
-
BlockItemUseContext
public BlockItemUseContext(ItemUseContext p_i47813_1_)
-
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 Detail
-
at
public static BlockItemUseContext at(BlockItemUseContext p_221536_0_, BlockPos p_221536_1_, Direction p_221536_2_)
-
getClickedPos
public BlockPos getClickedPos()
- Overrides:
getClickedPosin classItemUseContext
-
canPlace
public boolean canPlace()
-
replacingClickedOnBlock
public boolean replacingClickedOnBlock()
-
getNearestLookingDirection
public Direction getNearestLookingDirection()
-
getNearestLookingDirections
public Direction[] getNearestLookingDirections()
-
-