mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Fixed the requested changes for Terrain Movement. Tested and working.
This commit is contained in:
parent
9f197d415e
commit
af6f655d5e
7 changed files with 60 additions and 72 deletions
|
|
@ -14,7 +14,7 @@ namespace MinecraftClient.Mapping
|
|||
/// The X Coordinate
|
||||
/// </summary>
|
||||
public double X;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The Y Coordinate (vertical)
|
||||
/// </summary>
|
||||
|
|
@ -25,11 +25,6 @@ namespace MinecraftClient.Mapping
|
|||
/// </summary>
|
||||
public double Z;
|
||||
|
||||
/// <summary>
|
||||
/// Current world: to get the lowest Y coordinate
|
||||
/// </summary>
|
||||
public static World world;
|
||||
|
||||
/// <summary>
|
||||
/// Get location with zeroed coordinates
|
||||
/// </summary>
|
||||
|
|
@ -84,10 +79,7 @@ namespace MinecraftClient.Mapping
|
|||
{
|
||||
get
|
||||
{
|
||||
if (world.GetDimension() == null)
|
||||
return (int)Math.Floor(Y / Chunk.SizeY); // below 1.16.2, Y coordinate always start from zero
|
||||
else
|
||||
return (int)Math.Floor((Y - world.GetDimension().minY) / Chunk.SizeY);
|
||||
return (int)Math.Floor((Y - World.GetDimension().minY) / Chunk.SizeY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue