fix: guard sky-limit block updates

Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/c65d23bd-cf8c-4c62-8195-db980026eb94

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-05-06 20:31:28 +00:00 committed by GitHub
parent a57fb7f61f
commit 93d9939378
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -437,7 +437,7 @@ namespace MinecraftClient.Mapping
public void SetBlock(Location location, Block block)
{
ChunkColumn? column = this[location.ChunkX, location.ChunkZ];
if (column is not null && column.ColumnSize >= location.ChunkY)
if (column is not null && location.ChunkY >= 0 && location.ChunkY < column.ColumnSize)
{
Chunk? chunk = column.GetChunk(location);
if (chunk is null)