Class BlockPos

All Implemented Interfaces:
Comparable<Vector3i>
Direct Known Subclasses:
BlockPos.Mutable

@Immutable public class BlockPos extends Vector3i
  • 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

      private 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
    • Z_OFFSET

      private static final int Z_OFFSET
    • X_OFFSET

      private static final int X_OFFSET
  • Constructor Details

    • BlockPos

      public BlockPos(int p_i46030_1_, int p_i46030_2_, int p_i46030_3_)
    • BlockPos

      public BlockPos(double p_i46031_1_, double p_i46031_3_, double p_i46031_5_)
    • BlockPos

      public BlockPos(Vector3d p_i47100_1_)
    • BlockPos

      public BlockPos(IPosition p_i50799_1_)
    • BlockPos

      public BlockPos(Vector3i p_i46034_1_)
  • Method Details

    • offset

      public static long offset(long p_218289_0_, Direction p_218289_2_)
    • offset

      public static long offset(long p_218291_0_, int p_218291_2_, int p_218291_3_, int p_218291_4_)
    • getX

      public static int getX(long p_218290_0_)
    • getY

      public static int getY(long p_218274_0_)
    • getZ

      public static int getZ(long p_218282_0_)
    • of

      public static BlockPos of(long p_218283_0_)
    • asLong

      public long asLong()
    • asLong

      public static long asLong(int p_218276_0_, int p_218276_1_, int p_218276_2_)
    • getFlatIndex

      public static long getFlatIndex(long p_218288_0_)
    • offset

      public BlockPos offset(double p_177963_1_, double p_177963_3_, double p_177963_5_)
    • offset

      public BlockPos offset(int p_177982_1_, int p_177982_2_, int p_177982_3_)
    • offset

      public BlockPos offset(Vector3i p_177971_1_)
    • subtract

      public BlockPos subtract(Vector3i p_177973_1_)
    • above

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

      public BlockPos above(int p_177981_1_)
      Overrides:
      above in class Vector3i
    • below

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

      public BlockPos below(int p_177979_1_)
      Overrides:
      below in class Vector3i
    • north

      public BlockPos north()
    • north

      public BlockPos north(int p_177964_1_)
    • south

      public BlockPos south()
    • south

      public BlockPos south(int p_177970_1_)
    • west

      public BlockPos west()
    • west

      public BlockPos west(int p_177985_1_)
    • east

      public BlockPos east()
    • east

      public BlockPos east(int p_177965_1_)
    • relative

      public BlockPos relative(Direction p_177972_1_)
    • relative

      public BlockPos relative(Direction p_177967_1_, int p_177967_2_)
      Overrides:
      relative in class Vector3i
    • relative

      public BlockPos relative(Direction.Axis p_241872_1_, int p_241872_2_)
    • rotate

      public BlockPos rotate(Rotation p_190942_1_)
    • cross

      public BlockPos cross(Vector3i p_177955_1_)
      Overrides:
      cross in class Vector3i
    • immutable

      public BlockPos immutable()
    • mutable

      public BlockPos.Mutable mutable()
    • randomBetweenClosed

      public static Iterable<BlockPos> randomBetweenClosed(Random p_239585_0_, int p_239585_1_, int p_239585_2_, int p_239585_3_, int p_239585_4_, int p_239585_5_, int p_239585_6_, int p_239585_7_)
    • withinManhattan

      public static Iterable<BlockPos> withinManhattan(BlockPos p_239583_0_, int p_239583_1_, int p_239583_2_, int p_239583_3_)
    • findClosestMatch

      public static Optional<BlockPos> findClosestMatch(BlockPos p_239584_0_, int p_239584_1_, int p_239584_2_, Predicate<BlockPos> p_239584_3_)
    • withinManhattanStream

      public static Stream<BlockPos> withinManhattanStream(BlockPos p_239588_0_, int p_239588_1_, int p_239588_2_, int p_239588_3_)
    • betweenClosed

      public static Iterable<BlockPos> betweenClosed(BlockPos p_218278_0_, BlockPos p_218278_1_)
    • betweenClosedStream

      public static Stream<BlockPos> betweenClosedStream(BlockPos p_218281_0_, BlockPos p_218281_1_)
    • betweenClosedStream

      public static Stream<BlockPos> betweenClosedStream(MutableBoundingBox p_229383_0_)
    • betweenClosedStream

      public static Stream<BlockPos> betweenClosedStream(AxisAlignedBB p_239581_0_)
    • betweenClosedStream

      public static Stream<BlockPos> betweenClosedStream(int p_218287_0_, int p_218287_1_, int p_218287_2_, int p_218287_3_, int p_218287_4_, int p_218287_5_)
    • betweenClosed

      public static Iterable<BlockPos> betweenClosed(int p_191531_0_, int p_191531_1_, int p_191531_2_, int p_191531_3_, int p_191531_4_, int p_191531_5_)
    • spiralAround

      public static Iterable<BlockPos.Mutable> spiralAround(BlockPos p_243514_0_, int p_243514_1_, Direction p_243514_2_, Direction p_243514_3_)