man this tutorial level is really screwed up

todo??:

- fix the id system [days since the universe was created is NOT a valid id]
- fix literally everything else although thats probably caused by the discrepancy above
This commit is contained in:
Fireblade
2026-05-02 20:07:41 -04:00
parent d89fadff68
commit 02f1be3bb7
23 changed files with 217 additions and 70 deletions
+9 -1
View File
@@ -142,7 +142,15 @@ void ChestTileEntity::load(CompoundTag *base)
{
CompoundTag *tag = inventoryList->get(i);
unsigned int slot = tag->getByte(L"Slot") & 0xff;
if (slot >= 0 && slot < items->length) (*items)[slot] = ItemInstance::fromTag(tag);
if (slot < items->length)
{
shared_ptr<ItemInstance> loadedItem = ItemInstance::fromTag(tag);
if (loadedItem == nullptr)
{
app.DebugPrintf("[ChestTileEntity] Missing chest item at %d,%d,%d slot=%u id=%d count=%d damage=%d\n", x, y, z, slot, tag->getShort(L"id"), tag->getByte(L"Count"), tag->getShort(L"Damage"));
}
(*items)[slot] = loadedItem;
}
}
isBonusChest = base->getBoolean(L"bonus");
}