Package com.ryandw11.structure.schematic
Class SchematicLocationUtils
java.lang.Object
com.ryandw11.structure.schematic.SchematicLocationUtils
Location utilities for schematic placement.
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
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 pointcenter
- The centerangle
- 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 pointcenter
- The centerangle
- 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.
-