mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/GabsPuNs-MinecraftConsoles.git
synced 2026-07-11 00:28:59 +00:00
Use BYTE Win Typedef instead of byte typedef from Minecraft.World
This commit is contained in:
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user