mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Merge pull request #3098 from MCCTeam/copilot/bugfix-out-of-bounds-exception
This commit is contained in:
commit
6673b398b1
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue