fix: tutorial
items actually appear now yay item frames though...
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user