Interface BoundingBox3ic

All Known Implementing Classes:
BoundingBox3i

public sealed interface BoundingBox3ic permits BoundingBox3i
An inclusive integer bounding box with JOML interaction.
Since:
1.0.0
  • Method Details

    • intersects

      @Contract(pure=true) default boolean intersects(BoundingBox3ic other)
      Returns:
      if this box intersects with the given other box
    • intersects

      @Contract(pure=true) default boolean intersects(net.minecraft.world.level.levelgen.structure.BoundingBox other)
      Returns:
      if this box intersects with the given other box
    • intersects

      @Contract(pure=true) default boolean intersects(int minX, int minY, int minZ, int maxX, int maxY, int maxZ)
      Returns:
      if this box intersects with the given other box
    • contains

      @Contract(pure=true) default boolean contains(org.joml.Vector3ic point)
      Returns:
      if this box contains the given point
    • contains

      @Contract(pure=true) default boolean contains(int x, int y, int z)
      Returns:
      if this box contains the given point
    • contains

      @Contract(pure=true) default boolean contains(org.joml.Vector3dc other)
      Returns:
      if this box contains the given point
    • minX

      @Contract(pure=true) int minX()
      Returns:
      the minimum x value of this box
    • minY

      @Contract(pure=true) int minY()
      Returns:
      the minimum y value of this box
    • minZ

      @Contract(pure=true) int minZ()
      Returns:
      the minimum z value of this box
    • maxX

      @Contract(pure=true) int maxX()
      Returns:
      the maximum x value of this box
    • maxY

      @Contract(pure=true) int maxY()
      Returns:
      the maximum y value of this box
    • maxZ

      @Contract(pure=true) int maxZ()
      Returns:
      the maximum z value of this box
    • expandTo

      @Contract(value="_,_->param2", mutates="param2") default BoundingBox3i expandTo(org.joml.Vector3ic point, BoundingBox3i dest)
      Expands this box to include the given point
      Parameters:
      point - the point to include
      Returns:
      the result stored in dest
    • expandTo

      @Contract(value="_,_,_,_->param4", mutates="param4") default BoundingBox3i expandTo(int x, int y, int z, BoundingBox3i dest)
      Expands this box to include the given point
      Parameters:
      x - the x value of the point
      y - the y value of the point
      z - the z value of the point
      Returns:
      the result stored in dest
    • expandTo

      @Contract(value="_,_->param2", mutates="param2") default BoundingBox3i expandTo(BoundingBox3ic other, BoundingBox3i dest)
      Expands this box to include the given box
      Parameters:
      other - the box to include
      Returns:
      the result stored in dest
    • move

      @Contract(value="_,_->param2", mutates="param2") default BoundingBox3i move(org.joml.Vector3ic vec, BoundingBox3i dest)
      Translates this box by the given vector
      Parameters:
      vec - the vector to translate by
      Returns:
      the result stored in dest
    • move

      @Contract(value="_,_,_,_->param4", mutates="param4") default BoundingBox3i move(int x, int y, int z, BoundingBox3i dest)
      Translates this box by the given vector
      Parameters:
      x - the x value of the vector
      y - the y value of the vector
      z - the z value of the vector
      Returns:
      the result stored in dest
    • intersect

      @Contract(value="_,_->param2", mutates="param2") default BoundingBox3i intersect(BoundingBox3ic box, BoundingBox3i dest)
      Calculates the bounding box intersect between this box and the specified box.
      Parameters:
      box - The box to intersect with
      dest - The destination bounding box
      Returns:
      The result stored in dest
    • center

      @Contract(value="_->param1", mutates="param1") default org.joml.Vector3i center(org.joml.Vector3i dest)
      Returns:
      the center of this box stored in dest
    • size

      @Contract(value="_->param1", mutates="param1") default org.joml.Vector3i size(org.joml.Vector3i dest)
      Returns:
      the side length vector of this box stored in dest
    • width

      @Contract(pure=true) default int width()
      Returns:
      the encompassing X range
    • height

      @Contract(pure=true) default int height()
      Returns:
      the encompassing Y range
    • length

      @Contract(pure=true) default int length()
      Returns:
      the encompassing Z range
    • volume

      @Contract(pure=true) default int volume()
      Returns:
      the volume of this box
    • chunkBoundsFrom

      @Contract(value="->new", pure=true) default BoundingBox3i chunkBoundsFrom()
    • chunkBoundsFrom

      @Contract(value="_->param1", mutates="param1") default BoundingBox3i chunkBoundsFrom(BoundingBox3i dest)
    • toAABB

      @Contract(value="->new", pure=true) default net.minecraft.world.phys.AABB toAABB()
    • toMojang

      @Contract(value="->new", pure=true) default net.minecraft.world.level.levelgen.structure.BoundingBox toMojang()