Terrain: Fix coordinate parsing (negative coords)

- Optimize readNextUShortsLittleEndian network reading method
- Various coordinate computation issues, negative chunk offsets
- Properly parse negative coordinates for block change events
- Properly reach ground if less than 1 block over the ground
This commit is contained in:
ORelio 2015-12-08 00:34:40 +01:00
parent cb00c28b6e
commit 5d8d42e3d1
4 changed files with 43 additions and 22 deletions

View file

@ -57,7 +57,7 @@ namespace MinecraftClient.Mapping
/// <returns>The block</returns>
public Block GetBlock(Location location)
{
return this[((int)location.X) % Chunk.SizeX, ((int)location.Y) % Chunk.SizeY, ((int)location.Z) % Chunk.SizeZ];
return this[location.ChunkBlockX, location.ChunkBlockY, location.ChunkBlockZ];
}
}
}