Interface Cuboid

All Superinterfaces:
org.spongepowered.api.data.persistence.DataSerializable
All Known Implementing Classes:
CuboidImpl

@ConfigSerializable public interface Cuboid extends org.spongepowered.api.data.persistence.DataSerializable
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    boolean
    containsIntersectsPosition(org.spongepowered.math.vector.Vector3i vector3i)
    Checking for a position in the area
    void
    contract(int x, int y, int z)
    Decreasing area
    void
    expand(int x, int y, int z)
    Expanding area
    org.spongepowered.api.util.AABB
    Get AABB
    List<org.spongepowered.math.vector.Vector3i>
    Getting all corner positions of the area
    List<org.spongepowered.math.vector.Vector3i>
    Getting all positions in the cuboid.
    org.spongepowered.math.vector.Vector3d
    Get the center position of the selection.
    org.spongepowered.math.vector.Vector3i
    Getting the maximum position
    org.spongepowered.math.vector.Vector3i
    Getting the minimum position
    org.spongepowered.math.vector.Vector3i
    getOppositeCorner(org.spongepowered.math.vector.Vector3i vector3i)
    Obtaining the opposite corner of area.
    List<org.spongepowered.math.vector.Vector2i>
    Getting all positions in the cuboid.
    Get the type of area selection.
    long
    Obtaining the volume of an area depending on its type.
    long
    Obtaining the volume of the area with only XY coordinates.
    long
    Obtaining the volume of the area, taking into account all three coordinate axes.
    org.spongepowered.math.vector.Vector3d
    Get the sizes of the area by three coordinates
    int[]
    Get the sizes of the area by two coordinates
    boolean
    isCorner(org.spongepowered.math.vector.Vector3i vector3i)
    Checking if the position is a corner position
    static Cuboid
    of(org.spongepowered.api.util.AABB aabb)
     
    static Cuboid
    of(org.spongepowered.math.vector.Vector3i first, org.spongepowered.math.vector.Vector3i second)
     
    static Cuboid
    of(SelectorTypes type, org.spongepowered.api.util.AABB aabb)
     
    static Cuboid
    of(SelectorTypes type, org.spongepowered.math.vector.Vector3i first, org.spongepowered.math.vector.Vector3i second)
     
    setPositions(org.spongepowered.math.vector.Vector3i position1, org.spongepowered.math.vector.Vector3i position2, SelectorTypes selectorType, org.spongepowered.api.world.server.ServerWorld world)
    Setting positions at the cuboid.
    void
    Set the type of area selection.
    toFlat(org.spongepowered.api.world.server.ServerWorld world)
    Changing the positions of the cuboid according to the height of the world.

    Methods inherited from interface org.spongepowered.api.data.persistence.DataSerializable

    contentVersion, toContainer
  • Method Details

    • builder

      static Cuboid.Builder builder()
    • builder

      static Cuboid.Builder builder(SelectorTypes type)
    • of

      static Cuboid of(SelectorTypes type, org.spongepowered.math.vector.Vector3i first, org.spongepowered.math.vector.Vector3i second)
    • of

      static Cuboid of(org.spongepowered.math.vector.Vector3i first, org.spongepowered.math.vector.Vector3i second)
    • of

      static Cuboid of(org.spongepowered.api.util.AABB aabb)
    • of

      static Cuboid of(SelectorTypes type, org.spongepowered.api.util.AABB aabb)
    • getAllPositions

      List<org.spongepowered.math.vector.Vector3i> getAllPositions()
      Getting all positions in the cuboid.
    • getPositionsXZ

      List<org.spongepowered.math.vector.Vector2i> getPositionsXZ()
      Getting all positions in the cuboid. Excludes the Y-axis.
    • setPositions

      Cuboid setPositions(org.spongepowered.math.vector.Vector3i position1, org.spongepowered.math.vector.Vector3i position2, SelectorTypes selectorType, org.spongepowered.api.world.server.ServerWorld world)
      Setting positions at the cuboid.
      Parameters:
      position1 - - first position
      position2 - - second position
      selectorType - - flat or cuboid
    • getSelectorType

      SelectorTypes getSelectorType()
      Get the type of area selection.
    • setSelectorType

      void setSelectorType(SelectorTypes selectorType)
      Set the type of area selection.
    • getAABB

      org.spongepowered.api.util.AABB getAABB()
      Get AABB
    • getCenter

      org.spongepowered.math.vector.Vector3d getCenter()
      Get the center position of the selection.
    • getSizeXYZ

      org.spongepowered.math.vector.Vector3d getSizeXYZ()
      Get the sizes of the area by three coordinates
    • getSizeXZ

      int[] getSizeXZ()
      Get the sizes of the area by two coordinates
    • getSize3D

      long getSize3D()
      Obtaining the volume of the area, taking into account all three coordinate axes.
    • getSize2D

      long getSize2D()
      Obtaining the volume of the area with only XY coordinates.
    • getSize

      long getSize()
      Obtaining the volume of an area depending on its type.
    • expand

      void expand(int x, int y, int z)
      Expanding area
    • contract

      void contract(int x, int y, int z)
      Decreasing area
    • containsIntersectsPosition

      boolean containsIntersectsPosition(org.spongepowered.math.vector.Vector3i vector3i)
      Checking for a position in the area
      Parameters:
      vector3i - - Checkable position.
      Returns:
      - true if contains
      - false if not contains
    • getMin

      org.spongepowered.math.vector.Vector3i getMin()
      Getting the minimum position
    • getMax

      org.spongepowered.math.vector.Vector3i getMax()
      Getting the maximum position
    • getOppositeCorner

      org.spongepowered.math.vector.Vector3i getOppositeCorner(org.spongepowered.math.vector.Vector3i vector3i)
      Obtaining the opposite corner of area.
      Parameters:
      vector3i - - Position for the search
      Returns:
      - position for the search if position is not corner
      - position in the opposite corner according to the type of area
    • getAllCorners

      List<org.spongepowered.math.vector.Vector3i> getAllCorners()
      Getting all corner positions of the area
    • isCorner

      boolean isCorner(org.spongepowered.math.vector.Vector3i vector3i)
      Checking if the position is a corner position
      Parameters:
      vector3i - - checked position
      Returns:
      - true if position is corner
      - false if position isn't corner
    • toFlat

      Cuboid toFlat(org.spongepowered.api.world.server.ServerWorld world)
      Changing the positions of the cuboid according to the height of the world.