Package hm.zelha.particlesfx.util
Class LocationSafe
java.lang.Object
org.bukkit.Location
hm.zelha.particlesfx.util.LocationSafe
- All Implemented Interfaces:
Cloneable,org.bukkit.configuration.serialization.ConfigurationSerializable
public class LocationSafe
extends org.bukkit.Location
This class is meant to allow me to keep locations mutable without shapes going completely bonkers if they're modified
This class also extends
This class also extends
Location so you can use it in the same way as that class-
Constructor Summary
ConstructorsConstructorDescriptionLocationSafe(org.bukkit.Location location) LocationSafe(org.bukkit.World world, double x, double y, double z) -
Method Summary
Modifier and TypeMethodDescriptionadd(double x, double y, double z) add(org.bukkit.Location vec) add(org.bukkit.util.Vector vec) voidaddRecalcMechanic(ParticleShapeCompound owner, Consumer<org.bukkit.Location> mechanic) only meant to be used inParticleShapeCompoundclone()booleanmultiply(double m) voidonly meant to be used inParticleShapeCompoundvoidsetChanged(boolean changed) voidsetUnsafely(double x, double y, double z, boolean causedByCompound) only meant to be used inLVMath, use at own riskvoidsetX(double x) voidsetY(double y) voidsetZ(double z) subtract(double x, double y, double z) subtract(org.bukkit.Location vec) subtract(org.bukkit.util.Vector vec) zero()Methods inherited from class org.bukkit.Location
checkFinite, deserialize, distance, distanceSquared, equals, getBlock, getBlockX, getBlockY, getBlockZ, getChunk, getDirection, getPitch, getWorld, getX, getY, getYaw, getZ, hashCode, isWorldLoaded, length, lengthSquared, locToBlock, normalizePitch, normalizeYaw, serialize, setDirection, setPitch, setWorld, setYaw, toString, toVector
-
Constructor Details
-
LocationSafe
public LocationSafe(org.bukkit.World world, double x, double y, double z) - See Also:
-
LocationSafe
public LocationSafe(org.bukkit.Location location) - See Also:
-
-
Method Details
-
setUnsafely
public void setUnsafely(double x, double y, double z, boolean causedByCompound) only meant to be used inLVMath, use at own risk- Parameters:
x- x coordinatey- y coordinatez- z coordinatecausedByCompound- whether this was caused by aParticleShapeCompound
-
addRecalcMechanic
only meant to be used inParticleShapeCompound- Parameters:
owner- the owner of the shape that owns this locationmechanic- mechanic to be ran when this location is modified
-
removeRecalcMechanic
only meant to be used inParticleShapeCompound- Parameters:
owner- the owner of the shape that owns this location
-
clone
- Overrides:
clonein classorg.bukkit.Location
-
setX
public void setX(double x) - Overrides:
setXin classorg.bukkit.Location
-
setY
public void setY(double y) - Overrides:
setYin classorg.bukkit.Location
-
setZ
public void setZ(double z) - Overrides:
setZin classorg.bukkit.Location
-
add
- Overrides:
addin classorg.bukkit.Location
-
add
- Overrides:
addin classorg.bukkit.Location
-
add
- Overrides:
addin classorg.bukkit.Location
-
subtract
- Overrides:
subtractin classorg.bukkit.Location
-
subtract
- Overrides:
subtractin classorg.bukkit.Location
-
subtract
- Overrides:
subtractin classorg.bukkit.Location
-
multiply
- Overrides:
multiplyin classorg.bukkit.Location
-
zero
- Overrides:
zeroin classorg.bukkit.Location
-
setChanged
public void setChanged(boolean changed) -
isChanged
public boolean isChanged()
-