Interface WorldRegion<L,W>

Type Parameters:
L - the location type (platform-specific)
W - the world type (platform-specific)

public interface WorldRegion<L,W>
Represents a 3D rectangular region in the world.

World regions define cuboid areas used for arena bounds, protected zones, or game-specific areas. They are defined by two corner points (min and max) and provide utilities for containment checks and geometric calculations.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(L loc)
    Checks if a location is within this region's boundaries.
    Gets the center point of this region.
    Gets the maximum corner point of this region.
    Gets the minimum corner point of this region.
    int
    Calculates the volume of this region in cubic blocks.
    Gets the world this region is located in.
  • Method Details

    • getWorld

      W getWorld()
      Gets the world this region is located in.
      Returns:
      the world
    • getMin

      L getMin()
      Gets the minimum corner point of this region.

      This typically represents the corner with smallest X, Y, Z coordinates.

      Returns:
      the minimum boundary location
    • getMax

      L getMax()
      Gets the maximum corner point of this region.

      This typically represents the corner with largest X, Y, Z coordinates.

      Returns:
      the maximum boundary location
    • contains

      boolean contains(L loc)
      Checks if a location is within this region's boundaries.
      Parameters:
      loc - the location to check
      Returns:
      true if the location is inside the region, false otherwise
    • getVolume

      int getVolume()
      Calculates the volume of this region in cubic blocks.
      Returns:
      the volume (width × height × depth)
    • getCenter

      L getCenter()
      Gets the center point of this region.
      Returns:
      the center location