Class SchematicLocationUtils

java.lang.Object
com.ryandw11.structure.schematic.SchematicLocationUtils

public class SchematicLocationUtils extends Object
Location utilities for schematic placement.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.Location
    getMaximumLocation​(com.sk89q.worldedit.extent.clipboard.Clipboard clipboard, org.bukkit.Location pasteLocation, double rotation)
    Get the maximum location of a structure.
    static org.bukkit.Location
    getMinimumLocation​(com.sk89q.worldedit.extent.clipboard.Clipboard clipboard, org.bukkit.Location pasteLocation, double rotation)
    Get the minimum location of a structure.
    protected static boolean
    isNotAlreadyIn​(List<org.bukkit.Location> locations, org.bukkit.Location location)
    Checks to see if a location is not already inside a list of locations.
    static com.sk89q.worldedit.math.BlockVector3
    rotateAround​(com.sk89q.worldedit.math.BlockVector3 point, com.sk89q.worldedit.math.BlockVector3 center, double angle)
    Rotate the point around the center.
    static org.bukkit.Location
    rotateAround​(org.bukkit.Location point, org.bukkit.Location center, double angle)
    Rotate the point around a center.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • isNotAlreadyIn

      protected static boolean isNotAlreadyIn(List<org.bukkit.Location> locations, org.bukkit.Location location)
      Checks to see if a location is not already inside a list of locations.
      Parameters:
      locations - The list of locations.
      location - The location to check
      Returns:
      If it is not already in.
    • rotateAround

      public static com.sk89q.worldedit.math.BlockVector3 rotateAround(com.sk89q.worldedit.math.BlockVector3 point, com.sk89q.worldedit.math.BlockVector3 center, double angle)
      Rotate the point around the center.
      Parameters:
      point - The point
      center - The center
      angle - The angle to rotate by.
      Returns:
      The final position.
    • rotateAround

      public static org.bukkit.Location rotateAround(org.bukkit.Location point, org.bukkit.Location center, double angle)
      Rotate the point around a center.
      Parameters:
      point - The point
      center - The center
      angle - The angle to rotate by.
      Returns:
      The final position (in Location form).
    • getMinimumLocation

      public static org.bukkit.Location getMinimumLocation(com.sk89q.worldedit.extent.clipboard.Clipboard clipboard, org.bukkit.Location pasteLocation, double rotation)
      Get the minimum location of a structure.
      Parameters:
      clipboard - The clipboard of the paste.
      pasteLocation - The paste location.
      rotation - The rotation of the structure.
      Returns:
      The minimum location.
    • getMaximumLocation

      public static org.bukkit.Location getMaximumLocation(com.sk89q.worldedit.extent.clipboard.Clipboard clipboard, org.bukkit.Location pasteLocation, double rotation)
      Get the maximum location of a structure.
      Parameters:
      clipboard - The clipboard of the paste.
      pasteLocation - The paste location.
      rotation - The rotation of the structure.
      Returns:
      The maximum location.