Class Cuboid
java.lang.Object
com.storytimeproductions.models.stgames.Cuboid
Represents a 3D cuboid defined by two opposite corners in a Minecraft world. This class provides
methods to check if a given location is within the cuboid.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCuboid(org.bukkit.World world, int x1, int y1, int z1, int x2, int y2, int z2) Constructs a Cuboid with the specified world and corner coordinates. -
Method Summary
-
Field Details
-
world
public final org.bukkit.World world -
x1
public final int x1 -
y1
public final int y1 -
z1
public final int z1 -
x2
public final int x2 -
y2
public final int y2 -
z2
public final int z2
-
-
Constructor Details
-
Cuboid
public Cuboid(org.bukkit.World world, int x1, int y1, int z1, int x2, int y2, int z2) Constructs a Cuboid with the specified world and corner coordinates.- Parameters:
world- The world in which the cuboid exists.x1- The x-coordinate of one corner.y1- The y-coordinate of one corner.z1- The z-coordinate of one corner.x2- The x-coordinate of the opposite corner.y2- The y-coordinate of the opposite corner.z2- The z-coordinate of the opposite corner.
-
-
Method Details
-
contains
public boolean contains(org.bukkit.Location loc) Checks if the specified location is within this cuboid.- Parameters:
loc- The location to check.- Returns:
- true if the location is within the cuboid, false otherwise.
-
getLocations
Returns a list of all block locations within this cuboid.- Returns:
- List of Locations inside the cuboid.
-