mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/GabsPuNs-MinecraftConsoles.git
synced 2026-07-12 01:30:26 +00:00
Use BYTE Win Typedef instead of byte typedef from Minecraft.World
This commit is contained in:
@@ -99,8 +99,8 @@ void Sheep::defineSynchedData()
|
||||
{
|
||||
Animal::defineSynchedData();
|
||||
|
||||
// sheared and color share a byte
|
||||
entityData->define(DATA_WOOL_ID, static_cast<byte>(0)); //was new Byte((byte), 0)
|
||||
// sheared and color share a BYTE
|
||||
entityData->define(DATA_WOOL_ID, static_cast<BYTE>(0)); //was new Byte((BYTE), 0)
|
||||
}
|
||||
|
||||
void Sheep::dropDeathLoot(bool wasKilledByPlayer, int playerBonusLevel)
|
||||
@@ -117,7 +117,7 @@ int Sheep::getDeathLoot()
|
||||
return Tile::wool_Id;
|
||||
}
|
||||
|
||||
void Sheep::handleEntityEvent(byte id)
|
||||
void Sheep::handleEntityEvent(BYTE id)
|
||||
{
|
||||
if (id == EntityEvent::EAT_GRASS)
|
||||
{
|
||||
@@ -196,7 +196,7 @@ void Sheep::addAdditonalSaveData(CompoundTag *tag)
|
||||
{
|
||||
Animal::addAdditonalSaveData(tag);
|
||||
tag->putBoolean(L"Sheared", isSheared());
|
||||
tag->putByte(L"Color", static_cast<byte>(getColor()));
|
||||
tag->putByte(L"Color", static_cast<BYTE>(getColor()));
|
||||
}
|
||||
|
||||
void Sheep::readAdditionalSaveData(CompoundTag *tag)
|
||||
@@ -233,8 +233,8 @@ int Sheep::getColor()
|
||||
|
||||
void Sheep::setColor(int color)
|
||||
{
|
||||
byte current = entityData->getByte(DATA_WOOL_ID);
|
||||
entityData->set(DATA_WOOL_ID, static_cast<byte>((current & 0xf0) | (color & 0x0f)));
|
||||
BYTE current = entityData->getByte(DATA_WOOL_ID);
|
||||
entityData->set(DATA_WOOL_ID, static_cast<BYTE>((current & 0xf0) | (color & 0x0f)));
|
||||
}
|
||||
|
||||
bool Sheep::isSheared()
|
||||
@@ -244,14 +244,14 @@ bool Sheep::isSheared()
|
||||
|
||||
void Sheep::setSheared(bool value)
|
||||
{
|
||||
byte current = entityData->getByte(DATA_WOOL_ID);
|
||||
BYTE current = entityData->getByte(DATA_WOOL_ID);
|
||||
if (value)
|
||||
{
|
||||
entityData->set(DATA_WOOL_ID, static_cast<byte>(current | 0x10));
|
||||
entityData->set(DATA_WOOL_ID, static_cast<BYTE>(current | 0x10));
|
||||
}
|
||||
else
|
||||
{
|
||||
entityData->set(DATA_WOOL_ID, static_cast<byte>(current & ~0x10));
|
||||
entityData->set(DATA_WOOL_ID, static_cast<BYTE>(current & ~0x10));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user