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

@@ -100,8 +100,8 @@ void Wolf::defineSynchedData()
{
TamableAnimal::defineSynchedData();
entityData->define(DATA_HEALTH_ID, getHealth());
entityData->define(DATA_INTERESTED_ID, static_cast<byte>(0));
entityData->define(DATA_COLLAR_COLOR, static_cast<byte>(ColoredTile::getTileDataForItemAuxValue(DyePowderItem::RED)));
entityData->define(DATA_INTERESTED_ID, static_cast<BYTE>(0));
entityData->define(DATA_COLLAR_COLOR, static_cast<BYTE>(ColoredTile::getTileDataForItemAuxValue(DyePowderItem::RED)));
}
void Wolf::playStepSound(int xt, int yt, int zt, int t)
@@ -114,7 +114,7 @@ void Wolf::addAdditonalSaveData(CompoundTag *tag)
TamableAnimal::addAdditonalSaveData(tag);
tag->putBoolean(L"Angry", isAngry());
tag->putByte(L"CollarColor", static_cast<byte>(getCollarColor()));
tag->putByte(L"CollarColor", static_cast<BYTE>(getCollarColor()));
}
void Wolf::readAdditionalSaveData(CompoundTag *tag)
@@ -438,7 +438,7 @@ bool Wolf::mobInteract(shared_ptr<Player> player)
return TamableAnimal::mobInteract(player);
}
void Wolf::handleEntityEvent(byte id)
void Wolf::handleEntityEvent(BYTE id)
{
if (id == EntityEvent::SHAKE_WETNESS)
{
@@ -485,14 +485,14 @@ bool Wolf::isAngry()
void Wolf::setAngry(bool value)
{
byte current = entityData->getByte(DATA_FLAGS_ID);
BYTE current = entityData->getByte(DATA_FLAGS_ID);
if (value)
{
entityData->set(DATA_FLAGS_ID, static_cast<byte>(current | 0x02));
entityData->set(DATA_FLAGS_ID, static_cast<BYTE>(current | 0x02));
}
else
{
entityData->set(DATA_FLAGS_ID, static_cast<byte>(current & ~0x02));
entityData->set(DATA_FLAGS_ID, static_cast<BYTE>(current & ~0x02));
}
}
@@ -503,7 +503,7 @@ int Wolf::getCollarColor()
void Wolf::setCollarColor(int color)
{
entityData->set(DATA_COLLAR_COLOR, static_cast<byte>(color & 0xF));
entityData->set(DATA_COLLAR_COLOR, static_cast<BYTE>(color & 0xF));
}
// 4J-PB added for tooltips
@@ -536,11 +536,11 @@ void Wolf::setIsInterested(bool value)
{
if (value)
{
entityData->set(DATA_INTERESTED_ID, static_cast<byte>(1));
entityData->set(DATA_INTERESTED_ID, static_cast<BYTE>(1));
}
else
{
entityData->set(DATA_INTERESTED_ID, static_cast<byte>(0));
entityData->set(DATA_INTERESTED_ID, static_cast<BYTE>(0));
}
}