public class BlockItemUseContext extends ItemUseContext
Modifier and Type | Field and Description |
---|---|
private BlockPos |
relativePos |
protected boolean |
replaceClicked |
Constructor and Description |
---|
BlockItemUseContext(ItemUseContext p_i47813_1_) |
BlockItemUseContext(PlayerEntity p_i241237_1_,
Hand p_i241237_2_,
ItemStack p_i241237_3_,
BlockRayTraceResult p_i241237_4_) |
BlockItemUseContext(World p_i50056_1_,
PlayerEntity p_i50056_2_,
Hand p_i50056_3_,
ItemStack p_i50056_4_,
BlockRayTraceResult p_i50056_5_) |
Modifier and Type | Method and Description |
---|---|
static BlockItemUseContext |
at(BlockItemUseContext p_221536_0_,
BlockPos p_221536_1_,
Direction p_221536_2_) |
boolean |
canPlace() |
BlockPos |
getClickedPos() |
Direction |
getNearestLookingDirection() |
Direction[] |
getNearestLookingDirections() |
boolean |
replacingClickedOnBlock() |
getClickedFace, getClickLocation, getHand, getHitResult, getHorizontalDirection, getItemInHand, getLevel, getPlayer, getRotation, isInside, isSecondaryUseActive
private final BlockPos relativePos
protected boolean replaceClicked
public BlockItemUseContext(PlayerEntity p_i241237_1_, Hand p_i241237_2_, ItemStack p_i241237_3_, BlockRayTraceResult p_i241237_4_)
public BlockItemUseContext(ItemUseContext p_i47813_1_)
public BlockItemUseContext(World p_i50056_1_, @Nullable PlayerEntity p_i50056_2_, Hand p_i50056_3_, ItemStack p_i50056_4_, BlockRayTraceResult p_i50056_5_)
public static BlockItemUseContext at(BlockItemUseContext p_221536_0_, BlockPos p_221536_1_, Direction p_221536_2_)
public BlockPos getClickedPos()
getClickedPos
in class ItemUseContext
public boolean canPlace()
public boolean replacingClickedOnBlock()
public Direction getNearestLookingDirection()
public Direction[] getNearestLookingDirections()