From 42439de3d6584da3f046548ebe11ea23326df378 Mon Sep 17 00:00:00 2001 From: Richard Try Date: Sat, 7 Dec 2024 05:42:47 +0300 Subject: [PATCH 1/3] AreaMap2D getHeight fix Fix typo and return sizeY. --- src/util/AreaMap2D.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/AreaMap2D.hpp b/src/util/AreaMap2D.hpp index 8eb48f9b..1a6c97ce 100644 --- a/src/util/AreaMap2D.hpp +++ b/src/util/AreaMap2D.hpp @@ -180,7 +180,7 @@ namespace util { } TCoord getHeight() const { - return sizeX; + return sizeY; } const std::vector& getBuffer() const { From f6d5735f14d20e30135a32d1a88bd3e9eaa70975 Mon Sep 17 00:00:00 2001 From: Richard Try Date: Sat, 7 Dec 2024 18:57:16 +0300 Subject: [PATCH 2/3] Fix neighbour chunk update +1 for x axis is missed in getChunk() --- src/voxels/Chunks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/voxels/Chunks.cpp b/src/voxels/Chunks.cpp index 0942550e..94324964 100644 --- a/src/voxels/Chunks.cpp +++ b/src/voxels/Chunks.cpp @@ -422,7 +422,7 @@ void Chunks::set( if (lz == 0 && (chunk = getChunk(cx, cz - 1))) { chunk->flags.modified = true; } - if (lx == CHUNK_W - 1 && (chunk = getChunk(cx, cz))) { + if (lx == CHUNK_W - 1 && (chunk = getChunk(cx + 1, cz))) { chunk->flags.modified = true; } if (lz == CHUNK_D - 1 && (chunk = getChunk(cx, cz + 1))) { From 92fb19ba5e2307fdbcbf5d0e55f9c0712be45f72 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Sat, 7 Dec 2024 20:42:10 +0300 Subject: [PATCH 3/3] fix item.properties --- src/logic/scripting/scripting.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logic/scripting/scripting.cpp b/src/logic/scripting/scripting.cpp index 9b43cf28..a8b5f070 100644 --- a/src/logic/scripting/scripting.cpp +++ b/src/logic/scripting/scripting.cpp @@ -191,7 +191,7 @@ void scripting::on_content_load(Content* content) { lua::pop(L); } if (lua::getglobal(L, "item")) { - push_properties_tables(L, indices.blocks); + push_properties_tables(L, indices.items); lua::setfield(L, "properties"); lua::pop(L); }