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