public class BlockHitResult extends HitResult
HitResult.Type
Modifier and Type | Field and Description |
---|---|
private BlockPos |
blockPos |
private boolean |
insideBlock |
private boolean |
missed |
private Direction |
side |
Modifier | Constructor and Description |
---|---|
private |
BlockHitResult(boolean missed,
Vec3d pos,
Direction side,
BlockPos blockPos,
boolean insideBlock) |
|
BlockHitResult(Vec3d pos,
Direction side,
BlockPos blockPos,
boolean insideBlock) |
Modifier and Type | Method and Description |
---|---|
static BlockHitResult |
createMissed(Vec3d pos,
Direction side,
BlockPos blockPos) |
BlockPos |
getBlockPos() |
Direction |
getSide() |
HitResult.Type |
getType() |
boolean |
isInsideBlock() |
BlockHitResult |
withBlockPos(BlockPos blockPos) |
BlockHitResult |
withSide(Direction side) |
getPos, squaredDistanceTo
private final Direction side
private final BlockPos blockPos
private final boolean missed
private final boolean insideBlock
public BlockHitResult(Vec3d pos, Direction side, BlockPos blockPos, boolean insideBlock)
public static BlockHitResult createMissed(Vec3d pos, Direction side, BlockPos blockPos)
public BlockHitResult withSide(Direction side)
public BlockHitResult withBlockPos(BlockPos blockPos)
public BlockPos getBlockPos()
public Direction getSide()
public HitResult.Type getType()
public boolean isInsideBlock()