Class PortalGeometry
java.lang.Object
me.xxastaspastaxx.dimensions.completePortal.PortalGeometry
The class contains all the info about the portal structure
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
buildPortal(org.bukkit.Location newLocation, org.bukkit.World destinationWorld, CustomPortal customPortal)
Build a portalcreateGeometry(org.bukkit.util.Vector min, org.bukkit.util.Vector max)
Create PortalGeometry for a portalorg.bukkit.util.BoundingBox
org.bukkit.util.Vector
Get the center of the portalorg.bukkit.util.Vector
Get the top corner of the portal (inside the portal)org.bukkit.util.Vector
Get the bottom corner of the portal (inside the portal)org.bukkit.util.Vector
getMax()
Get the top corner of the portalorg.bukkit.util.Vector
getMin()
Get the bottom corner of the portalgetPortal(CustomPortal customPortal, org.bukkit.Location loc)
Check if there is a portal structure at the locationstatic PortalGeometry
getPortalGeometry(CustomPortal portal)
Get the PortalGeometry instance for the portalbyte
Get the height of the portalbyte
Get the width of the portalboolean
isInside(org.bukkit.Location location, boolean outside, boolean corner)
Check if the location is inside the portalboolean
iszAxis()
Check if the portal is built along the Z Axisstatic PortalGeometry
static void
setCustomGeometry(CustomPortal portal, PortalGeometry geom)
Override the instance of the PortalGeometry
-
Field Details
-
instance
DO NOT USE
-
-
Method Details
-
getMin
public org.bukkit.util.Vector getMin()Get the bottom corner of the portal -
getMax
public org.bukkit.util.Vector getMax()Get the top corner of the portal -
getInsideMin
public org.bukkit.util.Vector getInsideMin()Get the bottom corner of the portal (inside the portal) -
getInsideMax
public org.bukkit.util.Vector getInsideMax()Get the top corner of the portal (inside the portal) -
iszAxis
public boolean iszAxis()Check if the portal is built along the Z Axis -
getCenter
public org.bukkit.util.Vector getCenter()Get the center of the portal -
getPortalWidth
public byte getPortalWidth()Get the width of the portal -
getPortalHeight
public byte getPortalHeight()Get the height of the portal -
setCustomGeometry
Override the instance of the PortalGeometry- Parameters:
portal
- the portal to override the geometry forgeom
- the new instance of the portal geometry
-
getPortalGeometry
Get the PortalGeometry instance for the portal -
createGeometry
Create PortalGeometry for a portal- Parameters:
min
- the bottom corner of the portalmax
- the top corner of the portal
-
getPortal
Check if there is a portal structure at the location -
isInside
public boolean isInside(org.bukkit.Location location, boolean outside, boolean corner)Check if the location is inside the portal- Parameters:
location
- the locationoutside
- true to include the frame of the portalcorner
- true to include the corners of the portal
-
buildPortal
public void buildPortal(org.bukkit.Location newLocation, org.bukkit.World destinationWorld, CustomPortal customPortal)Build a portal- Parameters:
newLocation
- the location to build the portaldestinationWorld
- the world to build the portal atcustomPortal
-
-
nullGeometry
-
getBoundingBox
public org.bukkit.util.BoundingBox getBoundingBox()
-