Use BYTE Win Typedef instead of byte typedef from Minecraft.World

This commit is contained in:
GabsPuNs
2026-05-10 21:03:03 -04:00
parent 20d395b88d
commit 3e7983ab3c
216 changed files with 798 additions and 800 deletions

View File

@@ -146,7 +146,7 @@ shared_ptr<ItemInstance> ItemInstance::useTimeDepleted(Level *level, shared_ptr<
CompoundTag *ItemInstance::save(CompoundTag *compoundTag)
{
compoundTag->putShort(L"id", static_cast<short>(id));
compoundTag->putByte(L"Count", static_cast<byte>(count));
compoundTag->putByte(L"Count", static_cast<BYTE>(count));
compoundTag->putShort(L"Damage", static_cast<short>(auxValue));
if (tag != nullptr) compoundTag->put(L"tag", tag->copy());
return compoundTag;
@@ -729,7 +729,7 @@ void ItemInstance::enchant(const Enchantment *enchantment, int level)
ListTag<CompoundTag> *list = static_cast<ListTag<CompoundTag> *>(tag->get(L"ench"));
CompoundTag *ench = new CompoundTag();
ench->putShort((wchar_t *)TAG_ENCH_ID, static_cast<short>(enchantment->id));
ench->putShort((wchar_t *)TAG_ENCH_LEVEL, static_cast<byte>(level));
ench->putShort((wchar_t *)TAG_ENCH_LEVEL, static_cast<BYTE>(level));
list->add(ench);
}