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

@@ -81,8 +81,8 @@ void Creeper::defineSynchedData()
{
Monster::defineSynchedData();
entityData->define(DATA_SWELL_DIR, static_cast<byte>(-1));
entityData->define(DATA_IS_POWERED, static_cast<byte>(0));
entityData->define(DATA_SWELL_DIR, static_cast<BYTE>(-1));
entityData->define(DATA_IS_POWERED, static_cast<BYTE>(0));
}
void Creeper::addAdditonalSaveData(CompoundTag *entityTag)
@@ -90,13 +90,13 @@ void Creeper::addAdditonalSaveData(CompoundTag *entityTag)
Monster::addAdditonalSaveData(entityTag);
if (entityData->getByte(DATA_IS_POWERED) == 1) entityTag->putBoolean(L"powered", true);
entityTag->putShort(L"Fuse", static_cast<short>(maxSwell));
entityTag->putByte(L"ExplosionRadius", static_cast<byte>(explosionRadius));
entityTag->putByte(L"ExplosionRadius", static_cast<BYTE>(explosionRadius));
}
void Creeper::readAdditionalSaveData(CompoundTag *tag)
{
Monster::readAdditionalSaveData(tag);
entityData->set(DATA_IS_POWERED, static_cast<byte>(tag->getBoolean(L"powered") ? 1 : 0));
entityData->set(DATA_IS_POWERED, static_cast<BYTE>(tag->getBoolean(L"powered") ? 1 : 0));
if (tag->contains(L"Fuse")) maxSwell = tag->getShort(L"Fuse");
if (tag->contains(L"ExplosionRadius")) explosionRadius = tag->getByte(L"ExplosionRadius");
}
@@ -182,11 +182,11 @@ int Creeper::getSwellDir()
void Creeper::setSwellDir(int dir)
{
entityData->set(DATA_SWELL_DIR, static_cast<byte>(dir));
entityData->set(DATA_SWELL_DIR, static_cast<BYTE>(dir));
}
void Creeper::thunderHit(const LightningBolt *lightningBolt)
{
Monster::thunderHit(lightningBolt);
entityData->set(DATA_IS_POWERED, static_cast<byte>(1));
entityData->set(DATA_IS_POWERED, static_cast<BYTE>(1));
}