fix: block inventory not removing in some cases

This commit is contained in:
MihailRis 2026-02-23 17:05:13 +03:00
parent 413038dadc
commit e4d21c940b
3 changed files with 5 additions and 3 deletions

View file

@ -1,13 +1,13 @@
#include "Chunk.hpp"
#include <utility>
#include "content/ContentReport.hpp"
#include "items/Inventory.hpp"
#include "lighting/Lightmap.hpp"
#include "util/data_io.hpp"
#include "voxel.hpp"
#include <utility>
Chunk::Chunk(int xpos, int zpos, std::shared_ptr<Lightmap> lightmap)
: x(xpos), z(zpos), lightmap(std::move(lightmap)) {
bottom = 0;
@ -40,6 +40,7 @@ void Chunk::addBlockInventory(
void Chunk::removeBlockInventory(uint x, uint y, uint z) {
if (inventories.erase(vox_index(x, y, z))) {
flags.unsaved = true;
flags.inventoriesRemoved = true;
}
}