mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Support for using relative coordinates in /move
This commit is contained in:
parent
8f6b962607
commit
0eb8d9998c
4 changed files with 58 additions and 27 deletions
|
|
@ -47,6 +47,16 @@ namespace MinecraftClient.Mapping
|
|||
Z = z;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new location
|
||||
/// </summary>
|
||||
public Location(Location loc)
|
||||
{
|
||||
X = loc.X;
|
||||
Y = loc.Y;
|
||||
Z = loc.Z;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new location
|
||||
/// </summary>
|
||||
|
|
@ -67,7 +77,7 @@ namespace MinecraftClient.Mapping
|
|||
/// Round coordinates
|
||||
/// </summary>
|
||||
/// <returns>itself</returns>
|
||||
public Location ToFloor()
|
||||
public Location ConvertToFloor()
|
||||
{
|
||||
this.X = Math.Floor(this.X);
|
||||
this.Y = Math.Floor(this.Y);
|
||||
|
|
@ -79,7 +89,7 @@ namespace MinecraftClient.Mapping
|
|||
/// Get the center coordinates
|
||||
/// </summary>
|
||||
/// <returns>itself</returns>
|
||||
public Location ToCenter()
|
||||
public Location ConvertToCenter()
|
||||
{
|
||||
this.X = Math.Floor(this.X) + 0.5;
|
||||
this.Z = Math.Floor(this.Z) + 0.5;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue