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

@@ -175,7 +175,7 @@ void Player::defineSynchedData()
{
LivingEntity::defineSynchedData();
entityData->define(DATA_PLAYER_FLAGS_ID, static_cast<byte>(0));
entityData->define(DATA_PLAYER_FLAGS_ID, static_cast<BYTE>(0));
entityData->define(DATA_PLAYER_ABSORPTION_ID, static_cast<float>(0));
entityData->define(DATA_SCORE_ID, (int) 0);
}
@@ -591,7 +591,7 @@ void Player::completeUsingItem()
}
}
void Player::handleEntityEvent(byte id)
void Player::handleEntityEvent(BYTE id)
{
if (id == EntityEvent::USE_ITEM_COMPLETE)
{
@@ -2025,14 +2025,14 @@ bool Player::getPlayerFlag(int flag)
void Player::setPlayerFlag(int flag, bool value)
{
byte currentValue = entityData->getByte(DATA_PLAYER_FLAGS_ID);
BYTE currentValue = entityData->getByte(DATA_PLAYER_FLAGS_ID);
if (value)
{
entityData->set(DATA_PLAYER_FLAGS_ID, static_cast<byte>(currentValue | (1 << flag)));
entityData->set(DATA_PLAYER_FLAGS_ID, static_cast<BYTE>(currentValue | (1 << flag)));
}
else
{
entityData->set(DATA_PLAYER_FLAGS_ID, static_cast<byte>(currentValue & ~(1 << flag)));
entityData->set(DATA_PLAYER_FLAGS_ID, static_cast<BYTE>(currentValue & ~(1 << flag)));
}
}