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

@@ -132,8 +132,8 @@ LivingEntity::~LivingEntity()
void LivingEntity::defineSynchedData()
{
entityData->define(DATA_EFFECT_COLOR_ID, 0);
entityData->define(DATA_EFFECT_AMBIENCE_ID, static_cast<byte>(0));
entityData->define(DATA_ARROW_COUNT_ID, static_cast<byte>(0));
entityData->define(DATA_EFFECT_AMBIENCE_ID, static_cast<BYTE>(0));
entityData->define(DATA_ARROW_COUNT_ID, static_cast<BYTE>(0));
entityData->define(DATA_HEALTH_ID, 1.0f);
}
@@ -519,7 +519,7 @@ void LivingEntity::tickEffects()
{
if (activeEffects.empty())
{
entityData->set(DATA_EFFECT_AMBIENCE_ID, static_cast<byte>(0));
entityData->set(DATA_EFFECT_AMBIENCE_ID, static_cast<BYTE>(0));
entityData->set(DATA_EFFECT_COLOR_ID, 0);
setInvisible(false);
setWeakened(false);
@@ -532,7 +532,7 @@ void LivingEntity::tickEffects()
values.push_back(it.second);
}
int colorValue = PotionBrewing::getColorValue(&values);
entityData->set(DATA_EFFECT_AMBIENCE_ID, PotionBrewing::areAllEffectsAmbient(&values) ? static_cast<byte>(1) : static_cast<byte>(0));
entityData->set(DATA_EFFECT_AMBIENCE_ID, PotionBrewing::areAllEffectsAmbient(&values) ? static_cast<BYTE>(1) : static_cast<BYTE>(0));
values.clear();
entityData->set(DATA_EFFECT_COLOR_ID, colorValue);
setInvisible(hasEffect(MobEffect::invisibility->id));
@@ -1156,7 +1156,7 @@ int LivingEntity::getArrowCount()
void LivingEntity::setArrowCount(int count)
{
entityData->set(DATA_ARROW_COUNT_ID, static_cast<byte>(count));
entityData->set(DATA_ARROW_COUNT_ID, static_cast<BYTE>(count));
}
int LivingEntity::getCurrentSwingDuration()
@@ -1186,7 +1186,7 @@ void LivingEntity::swing()
}
}
void LivingEntity::handleEntityEvent(byte id)
void LivingEntity::handleEntityEvent(BYTE id)
{
if (id == EntityEvent::HURT)
{