Class BlockPos

java.lang.Object
net.minecraft.core.Vec3i
net.minecraft.core.BlockPos
All Implemented Interfaces:
Comparable<Vec3i>
Direct Known Subclasses:
BlockPos.MutableBlockPos

@Immutable public class BlockPos extends Vec3i
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<BlockPos> CODEC
    • LOGGER

      private static final org.apache.logging.log4j.Logger LOGGER
    • ZERO

      public static final BlockPos ZERO
    • PACKED_X_LENGTH

      private static final int PACKED_X_LENGTH
    • PACKED_Z_LENGTH

      private static final int PACKED_Z_LENGTH
    • PACKED_Y_LENGTH

      public static final int PACKED_Y_LENGTH
    • PACKED_X_MASK

      private static final long PACKED_X_MASK
    • PACKED_Y_MASK

      private static final long PACKED_Y_MASK
    • PACKED_Z_MASK

      private static final long PACKED_Z_MASK
    • Y_OFFSET

      private static final int Y_OFFSET
      See Also:
      Constant Field Values
    • Z_OFFSET

      private static final int Z_OFFSET
    • X_OFFSET

      private static final int X_OFFSET
  • Constructor Details

    • BlockPos

      public BlockPos(int p_121869_, int p_121870_, int p_121871_)
    • BlockPos

      public BlockPos(double p_121865_, double p_121866_, double p_121867_)
    • BlockPos

      public BlockPos(Vec3 p_121873_)
    • BlockPos

      public BlockPos(Position p_121875_)
    • BlockPos

      public BlockPos(Vec3i p_121877_)
  • Method Details

    • offset

      public static long offset(long p_121916_, Direction p_121917_)
    • offset

      public static long offset(long p_121911_, int p_121912_, int p_121913_, int p_121914_)
    • getX

      public static int getX(long p_121984_)
    • getY

      public static int getY(long p_122009_)
    • getZ

      public static int getZ(long p_122016_)
    • of

      public static BlockPos of(long p_122023_)
    • asLong

      public long asLong()
    • asLong

      public static long asLong(int p_121883_, int p_121884_, int p_121885_)
    • getFlatIndex

      public static long getFlatIndex(long p_122028_)
    • offset

      public BlockPos offset(double p_121879_, double p_121880_, double p_121881_)
      Overrides:
      offset in class Vec3i
    • offset

      public BlockPos offset(int p_121973_, int p_121974_, int p_121975_)
      Overrides:
      offset in class Vec3i
    • offset

      public BlockPos offset(Vec3i p_121956_)
      Overrides:
      offset in class Vec3i
    • subtract

      public BlockPos subtract(Vec3i p_121997_)
      Overrides:
      subtract in class Vec3i
    • multiply

      public BlockPos multiply(int p_175263_)
      Overrides:
      multiply in class Vec3i
    • above

      public BlockPos above()
      Overrides:
      above in class Vec3i
    • above

      public BlockPos above(int p_121972_)
      Overrides:
      above in class Vec3i
    • below

      public BlockPos below()
      Overrides:
      below in class Vec3i
    • below

      public BlockPos below(int p_122000_)
      Overrides:
      below in class Vec3i
    • north

      public BlockPos north()
      Overrides:
      north in class Vec3i
    • north

      public BlockPos north(int p_122014_)
      Overrides:
      north in class Vec3i
    • south

      public BlockPos south()
      Overrides:
      south in class Vec3i
    • south

      public BlockPos south(int p_122021_)
      Overrides:
      south in class Vec3i
    • west

      public BlockPos west()
      Overrides:
      west in class Vec3i
    • west

      public BlockPos west(int p_122026_)
      Overrides:
      west in class Vec3i
    • east

      public BlockPos east()
      Overrides:
      east in class Vec3i
    • east

      public BlockPos east(int p_122031_)
      Overrides:
      east in class Vec3i
    • relative

      public BlockPos relative(Direction p_121946_)
      Overrides:
      relative in class Vec3i
    • relative

      public BlockPos relative(Direction p_121948_, int p_121949_)
      Overrides:
      relative in class Vec3i
    • relative

      public BlockPos relative(Direction.Axis p_121943_, int p_121944_)
      Overrides:
      relative in class Vec3i
    • rotate

      public BlockPos rotate(Rotation p_121918_)
    • cross

      public BlockPos cross(Vec3i p_122011_)
      Overrides:
      cross in class Vec3i
    • atY

      public BlockPos atY(int p_175289_)
    • immutable

      public BlockPos immutable()
    • mutable

      public BlockPos.MutableBlockPos mutable()
    • randomInCube

      public static Iterable<BlockPos> randomInCube(Random p_175265_, int p_175266_, BlockPos p_175267_, int p_175268_)
    • randomBetweenClosed

      public static Iterable<BlockPos> randomBetweenClosed(Random p_121958_, int p_121959_, int p_121960_, int p_121961_, int p_121962_, int p_121963_, int p_121964_, int p_121965_)
    • withinManhattan

      public static Iterable<BlockPos> withinManhattan(BlockPos p_121926_, int p_121927_, int p_121928_, int p_121929_)
    • findClosestMatch

      public static Optional<BlockPos> findClosestMatch(BlockPos p_121931_, int p_121932_, int p_121933_, Predicate<BlockPos> p_121934_)
    • withinManhattanStream

      public static Stream<BlockPos> withinManhattanStream(BlockPos p_121986_, int p_121987_, int p_121988_, int p_121989_)
    • betweenClosed

      public static Iterable<BlockPos> betweenClosed(BlockPos p_121941_, BlockPos p_121942_)
    • betweenClosedStream

      public static Stream<BlockPos> betweenClosedStream(BlockPos p_121991_, BlockPos p_121992_)
    • betweenClosedStream

      public static Stream<BlockPos> betweenClosedStream(BoundingBox p_121920_)
    • betweenClosedStream

      public static Stream<BlockPos> betweenClosedStream(AABB p_121922_)
    • betweenClosedStream

      public static Stream<BlockPos> betweenClosedStream(int p_121887_, int p_121888_, int p_121889_, int p_121890_, int p_121891_, int p_121892_)
    • betweenClosed

      public static Iterable<BlockPos> betweenClosed(int p_121977_, int p_121978_, int p_121979_, int p_121980_, int p_121981_, int p_121982_)
    • spiralAround

      public static Iterable<BlockPos.MutableBlockPos> spiralAround(BlockPos p_121936_, int p_121937_, Direction p_121938_, Direction p_121939_)