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

@@ -332,10 +332,10 @@ void MapItemSavedData::tickCarriedBy(shared_ptr<Player> player, shared_ptr<ItemI
if (xd < -size || yd < -size || xd > size || yd > size)
{
if (xd <= -size) x = static_cast<byte>(size * 2 + 2.5);
if (yd <= -size) y = static_cast<byte>(size * 2 + 2.5);
if (xd >= size) x = static_cast<byte>(size * 2 + 1);
if (yd >= size) y = static_cast<byte>(size * 2 + 1);
if (xd <= -size) x = static_cast<BYTE>(size * 2 + 2.5);
if (yd <= -size) y = static_cast<BYTE>(size * 2 + 2.5);
if (xd >= size) x = static_cast<BYTE>(size * 2 + 1);
if (yd >= size) y = static_cast<BYTE>(size * 2 + 1);
}
#endif
//decorations.push_back(new MapDecoration(4, x, y, 0));
@@ -369,10 +369,10 @@ void MapItemSavedData::tickCarriedBy(shared_ptr<Player> player, shared_ptr<ItemI
if (xd < -size || yd < -size || xd > size || yd > size)
{
if (xd <= -size) x = static_cast<byte>(size * 2 + 2.5);
if (yd <= -size) y = static_cast<byte>(size * 2 + 2.5);
if (xd >= size) x = static_cast<byte>(size * 2 + 1);
if (yd >= size) y = static_cast<byte>(size * 2 + 1);
if (xd <= -size) x = static_cast<BYTE>(size * 2 + 2.5);
if (yd <= -size) y = static_cast<BYTE>(size * 2 + 2.5);
if (xd >= size) x = static_cast<BYTE>(size * 2 + 1);
if (yd >= size) y = static_cast<BYTE>(size * 2 + 1);
}
#endif
//decorations.push_back(new MapDecoration(7, x, y, 0));
@@ -401,10 +401,10 @@ void MapItemSavedData::tickCarriedBy(shared_ptr<Player> player, shared_ptr<ItemI
if (xd < -size || yd < -size || xd > size || yd > size)
{
if (xd <= -size) x = (byte) (size * 2 + 2.5);
if (yd <= -size) y = (byte) (size * 2 + 2.5);
if (xd >= size) x = (byte) (size * 2 + 1);
if (yd >= size) y = (byte) (size * 2 + 1);
if (xd <= -size) x = (BYTE) (size * 2 + 2.5);
if (yd <= -size) y = (BYTE) (size * 2 + 2.5);
if (xd >= size) x = (BYTE) (size * 2 + 1);
if (yd >= size) y = (BYTE) (size * 2 + 1);
}
#endif
//decorations.push_back(new MapDecoration(7, x, y, 0));
@@ -457,10 +457,10 @@ void MapItemSavedData::tickCarriedBy(shared_ptr<Player> player, shared_ptr<ItemI
rot = 0;
size--; // Added to match the old adjusted size
if (xd <= -size) x = static_cast<byte>(size * 2 + 2.5);
if (yd <= -size) y = static_cast<byte>(size * 2 + 2.5);
if (xd >= size) x = static_cast<byte>(size * 2 + 1);
if (yd >= size) y = static_cast<byte>(size * 2 + 1);
if (xd <= -size) x = static_cast<BYTE>(size * 2 + 2.5);
if (yd <= -size) y = static_cast<BYTE>(size * 2 + 2.5);
if (xd >= size) x = static_cast<BYTE>(size * 2 + 1);
if (yd >= size) y = static_cast<BYTE>(size * 2 + 1);
}
#endif
@@ -592,8 +592,8 @@ void MapItemSavedData::mergeInMapData(shared_ptr<MapItemSavedData> dataToAdd)
for (int z = 0; z < h; z++)
{
byte oldColor = colors[x + z * w];
byte newColor = dataToAdd->colors[x + z * w];
BYTE oldColor = colors[x + z * w];
BYTE newColor = dataToAdd->colors[x + z * w];
if (oldColor == 0 && oldColor != newColor)
{
if (yd0 > z) yd0 = z;