Class BlockPos

java.lang.Object
ua.mcchickenstudio.opencreative.utils.millennium.vectors.Vec3i
ua.mcchickenstudio.opencreative.utils.millennium.math.BlockPos
All Implemented Interfaces:
Comparable

public class BlockPos extends Vec3i
  • Field Details

    • ORIGIN

      public static final BlockPos ORIGIN
  • Constructor Details

    • BlockPos

      public BlockPos(int x, int y, int z)
    • BlockPos

      public BlockPos(double x, double y, double z)
  • Method Details

    • add

      public BlockPos add(double x, double y, double z)
      Add the given coordinates to the coordinates of this BlockPos
      Parameters:
      x - X coordinate
      y - Y coordinate
      z - Z coordinate
    • add

      public BlockPos add(int x, int y, int z)
      Add the given coordinates to the coordinates of this BlockPos
      Parameters:
      x - X coordinate
      y - Y coordinate
      z - Z coordinate
    • add

      public BlockPos add(Vec3i vec)
      Add the given Vector to this BlockPos
    • subtract

      public BlockPos subtract(Vec3i vec)
      Subtract the given Vector from this BlockPos
    • multiply

      public BlockPos multiply(int factor)
      Multiply every coordinate by the given factor
    • offset

      public BlockPos offset(EnumFacing facing)
      Offset this BlockPos 1 block in the given direction
    • offset

      public BlockPos offset(EnumFacing facing, int n)
      Offset this BlockPos n blocks in the given direction
    • crossProductBP

      public BlockPos crossProductBP(Vec3i vec)
      Calculate the cross product of this BlockPos and the given Vector. Version of crossProduct that returns a BlockPos instead of a Vec3i
    • crossProduct

      public Vec3i crossProduct(Vec3i vec)
      Calculate the cross product of this and the given Vector