mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Fix /move
This commit is contained in:
parent
531f3408a0
commit
223c13561c
6 changed files with 62 additions and 45 deletions
|
|
@ -76,24 +76,19 @@ namespace MinecraftClient.Mapping
|
|||
/// <summary>
|
||||
/// Round coordinates
|
||||
/// </summary>
|
||||
/// <returns>itself</returns>
|
||||
public Location ConvertToFloor()
|
||||
/// <returns>New location</returns>
|
||||
public Location ToFloor()
|
||||
{
|
||||
this.X = Math.Floor(this.X);
|
||||
this.Y = Math.Floor(this.Y);
|
||||
this.Z = Math.Floor(this.Z);
|
||||
return this;
|
||||
return new Location(Math.Floor(this.X), Math.Floor(this.Y), Math.Floor(this.Z));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the center coordinates
|
||||
/// </summary>
|
||||
/// <returns>itself</returns>
|
||||
public Location ConvertToCenter()
|
||||
/// <returns>New location</returns>
|
||||
public Location ToCenter()
|
||||
{
|
||||
this.X = Math.Floor(this.X) + 0.5;
|
||||
this.Z = Math.Floor(this.Z) + 0.5;
|
||||
return this;
|
||||
return new Location(Math.Floor(this.X) + 0.5, this.Y, Math.Floor(this.Z) + 0.5);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue