mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
terrain handling for 1.18(1.18.1) and 1.18.2
This commit is contained in:
parent
af574b654e
commit
516effa81d
6 changed files with 384 additions and 120 deletions
|
|
@ -25,6 +25,11 @@ 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>
|
||||
|
|
@ -79,7 +84,10 @@ namespace MinecraftClient.Mapping
|
|||
{
|
||||
get
|
||||
{
|
||||
return (int)Math.Floor(Y / Chunk.SizeY);
|
||||
if (world.GetDimension() == null)
|
||||
return (int)Math.Floor(Y / Chunk.SizeY); // old version, always start at zero
|
||||
else
|
||||
return (int)Math.Floor((Y - world.GetDimension().min_y) / Chunk.SizeY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue