fix: tutorial

items actually appear now yay
item frames though...
This commit is contained in:
Fireblade
2026-05-03 01:43:43 -04:00
parent 229d22ab7b
commit a7cad496e3
7 changed files with 759 additions and 7 deletions
+15 -1
View File
@@ -147,7 +147,21 @@ void ChestTileEntity::load(CompoundTag *base)
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"));
Tag *idTag = tag->get(L"id");
int idType = idTag != nullptr ? idTag->getId() : -1;
if (idType == Tag::TAG_String)
{
app.DebugPrintf("[ChestTileEntity] Missing chest item at %d,%d,%d slot=%u idType=%d idStr=%ls count=%d damage=%d\n", x, y, z, slot, idType, tag->getString(L"id").c_str(), tag->getByte(L"Count"), tag->getShort(L"Damage"));
}
else if (idType == Tag::TAG_Int)
{
app.DebugPrintf("[ChestTileEntity] Missing chest item at %d,%d,%d slot=%u idType=%d id=%d count=%d damage=%d\n", x, y, z, slot, idType, tag->getInt(L"id"), tag->getByte(L"Count"), tag->getShort(L"Damage"));
}
else
{
app.DebugPrintf("[ChestTileEntity] Missing chest item at %d,%d,%d slot=%u idType=%d id=%d count=%d damage=%d\n", x, y, z, slot, idType, tag->getShort(L"id"), tag->getByte(L"Count"), tag->getShort(L"Damage"));
}
}
(*items)[slot] = loadedItem;
}