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

@@ -68,9 +68,9 @@ void Zombie::defineSynchedData()
{
Monster::defineSynchedData();
getEntityData()->define(DATA_BABY_ID, static_cast<byte>(0));
getEntityData()->define(DATA_VILLAGER_ID, static_cast<byte>(0));
getEntityData()->define(DATA_CONVERTING_ID, static_cast<byte>(0));
getEntityData()->define(DATA_BABY_ID, static_cast<BYTE>(0));
getEntityData()->define(DATA_VILLAGER_ID, static_cast<BYTE>(0));
getEntityData()->define(DATA_CONVERTING_ID, static_cast<BYTE>(0));
}
int Zombie::getArmorValue()
@@ -87,12 +87,12 @@ bool Zombie::useNewAi()
bool Zombie::isBaby()
{
return getEntityData()->getByte(DATA_BABY_ID) == static_cast<byte>(1);
return getEntityData()->getByte(DATA_BABY_ID) == static_cast<BYTE>(1);
}
void Zombie::setBaby(bool baby)
{
getEntityData()->set(DATA_BABY_ID, (byte) (baby ? 1 : 0));
getEntityData()->set(DATA_BABY_ID, (BYTE) (baby ? 1 : 0));
updateSize(baby);
if (level != nullptr && !level->isClientSide)
@@ -108,12 +108,12 @@ void Zombie::setBaby(bool baby)
bool Zombie::isVillager()
{
return getEntityData()->getByte(DATA_VILLAGER_ID) == static_cast<byte>(1);
return getEntityData()->getByte(DATA_VILLAGER_ID) == static_cast<BYTE>(1);
}
void Zombie::setVillager(bool villager)
{
getEntityData()->set(DATA_VILLAGER_ID, static_cast<byte>(villager ? 1 : 0));
getEntityData()->set(DATA_VILLAGER_ID, static_cast<BYTE>(villager ? 1 : 0));
}
void Zombie::aiStep()
@@ -426,7 +426,7 @@ bool Zombie::mobInteract(shared_ptr<Player> player)
void Zombie::startConverting(int time)
{
villagerConversionTime = time;
getEntityData()->set(DATA_CONVERTING_ID, static_cast<byte>(1));
getEntityData()->set(DATA_CONVERTING_ID, static_cast<BYTE>(1));
removeEffect(MobEffect::weakness->id);
addEffect(new MobEffectInstance(MobEffect::damageBoost->id, time, min(level->difficulty - 1, 0)));
@@ -434,7 +434,7 @@ void Zombie::startConverting(int time)
level->broadcastEntityEvent(shared_from_this(), EntityEvent::ZOMBIE_CONVERTING);
}
void Zombie::handleEntityEvent(byte id)
void Zombie::handleEntityEvent(BYTE id)
{
if (id == EntityEvent::ZOMBIE_CONVERTING)
{
@@ -453,7 +453,7 @@ bool Zombie::removeWhenFarAway()
bool Zombie::isConverting()
{
return getEntityData()->getByte(DATA_CONVERTING_ID) == static_cast<byte>(1);
return getEntityData()->getByte(DATA_CONVERTING_ID) == static_cast<BYTE>(1);
}
void Zombie::finishConversion()