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

@@ -19,7 +19,7 @@ TamableAnimal::~TamableAnimal()
void TamableAnimal::defineSynchedData()
{
Animal::defineSynchedData();
entityData->define(DATA_FLAGS_ID, static_cast<byte>(0));
entityData->define(DATA_FLAGS_ID, static_cast<BYTE>(0));
entityData->define(DATA_OWNERUUID_ID, L"");
}
@@ -87,7 +87,7 @@ void TamableAnimal::spawnTamingParticles(bool success)
}
}
void TamableAnimal::handleEntityEvent(byte id)
void TamableAnimal::handleEntityEvent(BYTE id)
{
if (id == EntityEvent::TAMING_SUCCEEDED)
{
@@ -110,14 +110,14 @@ bool TamableAnimal::isTame()
void TamableAnimal::setTame(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 | 0x04));
entityData->set(DATA_FLAGS_ID, static_cast<BYTE>(current | 0x04));
}
else
{
entityData->set(DATA_FLAGS_ID, static_cast<byte>(current & ~0x04));
entityData->set(DATA_FLAGS_ID, static_cast<BYTE>(current & ~0x04));
}
}
@@ -128,14 +128,14 @@ bool TamableAnimal::isSitting()
void TamableAnimal::setSitting(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 | 0x01));
entityData->set(DATA_FLAGS_ID, static_cast<BYTE>(current | 0x01));
}
else
{
entityData->set(DATA_FLAGS_ID, static_cast<byte>(current & ~0x01));
entityData->set(DATA_FLAGS_ID, static_cast<BYTE>(current & ~0x01));
}
}