Class PortalGeometry

java.lang.Object
me.xxastaspastaxx.dimensions.completePortal.PortalGeometry

public class PortalGeometry extends Object
The class contains all the info about the portal structure
  • Field Details

  • 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

      public static void setCustomGeometry(CustomPortal portal, PortalGeometry geom)
      Override the instance of the PortalGeometry
      Parameters:
      portal - the portal to override the geometry for
      geom - the new instance of the portal geometry
    • getPortalGeometry

      public static PortalGeometry getPortalGeometry(CustomPortal portal)
      Get the PortalGeometry instance for the portal
    • createGeometry

      public PortalGeometry createGeometry(org.bukkit.util.Vector min, org.bukkit.util.Vector max)
      Create PortalGeometry for a portal
      Parameters:
      min - the bottom corner of the portal
      max - the top corner of the portal
    • getPortal

      public PortalGeometry getPortal(CustomPortal customPortal, org.bukkit.Location loc)
      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 location
      outside - true to include the frame of the portal
      corner - 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 portal
      destinationWorld - the world to build the portal at
      customPortal -
    • nullGeometry

      public static PortalGeometry nullGeometry()
    • getBoundingBox

      public org.bukkit.util.BoundingBox getBoundingBox()