public class StructureBoundingBox extends Object
Constructor and Description |
---|
StructureBoundingBox(org.bukkit.util.Vector min,
org.bukkit.util.Vector max) |
Modifier and Type | Method and Description |
---|---|
void |
expandTo(StructureBoundingBox boundingBox)
Changes this bounding box to the bounding box of the union of itself and another bounding
box.
|
org.bukkit.util.Vector |
getMax() |
org.bukkit.util.Vector |
getMin() |
boolean |
intersectsWith(int minX,
int minZ,
int maxX,
int maxZ)
Whether this box intersects the given vertically-infinite box.
|
boolean |
intersectsWith(StructureBoundingBox boundingBox)
Whether this box intersects the given box.
|
boolean |
isVectorInside(org.bukkit.util.Vector vec)
Checks whether the given point is inside a block that intersects this box.
|
void |
offset(org.bukkit.util.Vector offset) |
public StructureBoundingBox(org.bukkit.util.Vector min, org.bukkit.util.Vector max)
public boolean isVectorInside(org.bukkit.util.Vector vec)
vec
- the point to checkvec
public boolean intersectsWith(StructureBoundingBox boundingBox)
boundingBox
- the box to check intersection withpublic boolean intersectsWith(int minX, int minZ, int maxX, int maxZ)
minX
- the minimum X coordinateminZ
- the minimum Z coordinatemaxX
- the maximum X coordinatemaxZ
- the maximum Z coordinatepublic void expandTo(StructureBoundingBox boundingBox)
boundingBox
- the other bounding box to containpublic void offset(org.bukkit.util.Vector offset)
public org.bukkit.util.Vector getMin()
public org.bukkit.util.Vector getMax()
Copyright © 2021. All rights reserved.