public class Location extends ThreeDimensionalVector
ThreeDimensionalVector
in order to provide
Minecraft-specific functionalityConstructor and Description |
---|
Location(double x,
double y,
double z,
net.minecraft.world.World world)
Constructs a location object
|
Location(net.minecraft.entity.Entity entity)
Constructs a location object at an entity's location
|
Location(Location location)
Clones a location object
|
Location(net.minecraft.tileentity.TileEntity tileEntity)
Constructs a location object at a tile entity's location
|
Modifier and Type | Method and Description |
---|---|
net.minecraft.util.ChunkCoordinates |
chunkCoordsFromLocation()
Converts the location into ChunkCoordinates
|
boolean |
equals(java.lang.Object other) |
java.util.HashMap<java.lang.String,java.lang.Double> |
getPlayers(double range)
Gets the nearby players to this location
|
net.minecraft.world.World |
getWorld()
Gets the world for this object
|
int |
hashCode() |
static Location |
locationFromChunkCoords(net.minecraft.util.ChunkCoordinates coords,
net.minecraft.world.World world)
Converts ChunkCoordinates to a location
|
net.minecraft.util.ChunkCoordinates |
toChunkCoordinates()
Converts this into a chunk coordinats object
|
add, compareTo, crossProduct, distanceTo, dotProduct, dotProduct, getRoundedX, getRoundedY, getRoundedZ, getX, getY, getZ, length, midpoint, normalize, rotateX, rotateX, rotateY, rotateY, rotateZ, rotateZ, setComponents, subtract, to2D, toString
public Location(double x, double y, double z, net.minecraft.world.World world)
x
- X coordy
- Y coordz
- Z coordworld
- The worldpublic Location(net.minecraft.entity.Entity entity)
entity
- The entitypublic Location(net.minecraft.tileentity.TileEntity tileEntity)
tileEntity
- The tile entitypublic Location(Location location)
location
- The location to clonepublic static Location locationFromChunkCoords(net.minecraft.util.ChunkCoordinates coords, net.minecraft.world.World world)
coords
- The coordsworld
- The worldpublic net.minecraft.util.ChunkCoordinates chunkCoordsFromLocation()
public net.minecraft.world.World getWorld()
public java.util.HashMap<java.lang.String,java.lang.Double> getPlayers(double range)
range
- The range to searchpublic net.minecraft.util.ChunkCoordinates toChunkCoordinates()
public boolean equals(java.lang.Object other)
equals
in class ThreeDimensionalVector
public int hashCode()
hashCode
in class java.lang.Object