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

@@ -74,7 +74,7 @@ shared_ptr<MapItemSavedData> MapItem::getSavedData(shared_ptr<ItemInstance> item
mapItemSavedData->x = Math::round(static_cast<float>(level->getLevelData()->getXSpawn()) / scale) * scale;
mapItemSavedData->z = Math::round(level->getLevelData()->getZSpawn() / scale) * scale;
#endif
mapItemSavedData->dimension = static_cast<byte>(level->dimension->id);
mapItemSavedData->dimension = static_cast<BYTE>(level->dimension->id);
mapItemSavedData->setDirty();
@@ -236,8 +236,8 @@ void MapItem::update(Level *level, shared_ptr<Entity> player, shared_ptr<MapItem
{
continue;
}
byte oldColor = data->colors[x + z * w];
byte newColor = static_cast<byte>(col * 4 + br);
BYTE oldColor = data->colors[x + z * w];
BYTE newColor = static_cast<BYTE>(col * 4 + br);
if (oldColor != newColor)
{
if (yd0 > z) yd0 = z;
@@ -335,7 +335,7 @@ void MapItem::onCraftedBy(shared_ptr<ItemInstance> itemInstance, Level *level, s
// 4J-PB - for Xbox maps, we'll centre them on the origin of the world, since we can fit the whole world in our map
data->x = centreXC;
data->z = centreZC;
data->dimension = static_cast<byte>(level->dimension->id);
data->dimension = static_cast<BYTE>(level->dimension->id);
data->setDirty();
}