FourKit 1469f90c
The LCE C# Server Plugin API
Loading...
Searching...
No Matches
Minecraft.Server.FourKit.Location Class Reference

Represents a 3-dimensional position in a world. More...

Public Member Functions

 Location (World? world, double x, double y, double z, float yaw, float pitch)
 Constructs a new Location with the given coordinates and direction.
 Location (World? world, double x, double y, double z)
 Constructs a new Location with the given coordinates.
 Location (double x, double y, double z)
 Creates a new Location with the given coordinates and no world.
double getX ()
 Gets the x-coordinate of this location.
void setX (double x)
 Sets the x-coordinate of this location.
double getY ()
 Gets the y-coordinate of this location.
void setY (double y)
 Sets the y-coordinate of this location.
double getZ ()
 Gets the z-coordinate of this location.
void setZ (double z)
 Sets the z-coordinate of this location.
float getYaw ()
 Gets the yaw of this location, measured in degrees.
void setYaw (float yaw)
 Sets the yaw of this location, measured in degrees.
float getPitch ()
 Gets the pitch of this location, measured in degrees.
void setPitch (float pitch)
 Sets the pitch of this location, measured in degrees.
WorldgetWorld ()
 Gets the world that this location resides in.
void setWorld (World? world)
 Sets the world that this location resides in.
int getBlockX ()
 Gets the floored value of the X component, indicating the block that this location is contained with.
int getBlockY ()
 Gets the floored value of the Y component, indicating the block that this location is contained with.
int getBlockZ ()
 Gets the floored value of the Z component, indicating the block that this location is contained with.
double length ()
 Gets the magnitude of the location, defined as sqrt(x^2+y^2+z^2).
double lengthSquared ()
 Gets the magnitude of the location squared.
Location add (double x, double y, double z)
 Adds the location by another.
Location add (Location vec)
 Adds the location by another.
override string ToString ()

Detailed Description

Represents a 3-dimensional position in a world.

Constructor & Destructor Documentation

◆ Location() [1/3]

Minecraft.Server.FourKit.Location.Location ( World? world,
double x,
double y,
double z,
float yaw,
float pitch )

Constructs a new Location with the given coordinates and direction.

Parameters
worldThe world in which this location resides.
xThe x-coordinate.
yThe y-coordinate.
zThe z-coordinate.
yawThe absolute rotation on the x-plane, in degrees.
pitchThe absolute rotation on the y-plane, in degrees.

◆ Location() [2/3]

Minecraft.Server.FourKit.Location.Location ( World? world,
double x,
double y,
double z )

Constructs a new Location with the given coordinates.

Parameters
worldThe world in which this location resides.
xThe x-coordinate.
yThe y-coordinate.
zThe z-coordinate.

◆ Location() [3/3]

Minecraft.Server.FourKit.Location.Location ( double x,
double y,
double z )

Creates a new Location with the given coordinates and no world.

Parameters
xThe x-coordinate.
yThe y-coordinate.
zThe z-coordinate.

Member Function Documentation

◆ add() [1/2]

Location Minecraft.Server.FourKit.Location.add ( double x,
double y,
double z )

Adds the location by another.

Parameters
xThe x-coordinate to add.
yThe y-coordinate to add.
zThe z-coordinate to add.
Returns
This location, for chaining.

◆ add() [2/2]

Location Minecraft.Server.FourKit.Location.add ( Location vec)

Adds the location by another.

Parameters
vecThe location to add.
Returns
This location, for chaining.

◆ getBlockX()

int Minecraft.Server.FourKit.Location.getBlockX ( )

Gets the floored value of the X component, indicating the block that this location is contained with.

Returns
The block X.

◆ getBlockY()

int Minecraft.Server.FourKit.Location.getBlockY ( )

Gets the floored value of the Y component, indicating the block that this location is contained with.

Returns
The block Y.

◆ getBlockZ()

int Minecraft.Server.FourKit.Location.getBlockZ ( )

Gets the floored value of the Z component, indicating the block that this location is contained with.

Returns
The block Z.

◆ getPitch()

float Minecraft.Server.FourKit.Location.getPitch ( )

Gets the pitch of this location, measured in degrees.

Returns
The pitch.

◆ getWorld()

World? Minecraft.Server.FourKit.Location.getWorld ( )

Gets the world that this location resides in.

Returns
The world, or null if not set.

◆ getX()

double Minecraft.Server.FourKit.Location.getX ( )

Gets the x-coordinate of this location.

Returns
The x-coordinate.

◆ getY()

double Minecraft.Server.FourKit.Location.getY ( )

Gets the y-coordinate of this location.

Returns
The y-coordinate.

◆ getYaw()

float Minecraft.Server.FourKit.Location.getYaw ( )

Gets the yaw of this location, measured in degrees.

Returns
The yaw.

◆ getZ()

double Minecraft.Server.FourKit.Location.getZ ( )

Gets the z-coordinate of this location.

Returns
The z-coordinate.

◆ length()

double Minecraft.Server.FourKit.Location.length ( )

Gets the magnitude of the location, defined as sqrt(x^2+y^2+z^2).

Returns
The magnitude.

◆ lengthSquared()

double Minecraft.Server.FourKit.Location.lengthSquared ( )

Gets the magnitude of the location squared.

Returns
The magnitude squared.

◆ setPitch()

void Minecraft.Server.FourKit.Location.setPitch ( float pitch)

Sets the pitch of this location, measured in degrees.

Parameters
pitchThe new pitch.

◆ setWorld()

void Minecraft.Server.FourKit.Location.setWorld ( World? world)

Sets the world that this location resides in.

Parameters
worldThe new world.

◆ setX()

void Minecraft.Server.FourKit.Location.setX ( double x)

Sets the x-coordinate of this location.

Parameters
xThe new x-coordinate.

◆ setY()

void Minecraft.Server.FourKit.Location.setY ( double y)

Sets the y-coordinate of this location.

Parameters
yThe new y-coordinate.

◆ setYaw()

void Minecraft.Server.FourKit.Location.setYaw ( float yaw)

Sets the yaw of this location, measured in degrees.

Parameters
yawThe new yaw.

◆ setZ()

void Minecraft.Server.FourKit.Location.setZ ( double z)

Sets the z-coordinate of this location.

Parameters
zThe new z-coordinate.

The documentation for this class was generated from the following file:
  • Minecraft.Server.FourKit/Location.cs