mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/GabsPuNs-MinecraftConsoles.git
synced 2026-07-11 09:18:27 +00:00
Use BYTE Win Typedef instead of byte typedef from Minecraft.World
This commit is contained in:
@@ -123,7 +123,7 @@ Arrow::Arrow(Level *level, shared_ptr<LivingEntity> mob, float power) : Entity(
|
||||
|
||||
void Arrow::defineSynchedData()
|
||||
{
|
||||
entityData->define(ID_FLAGS, static_cast<byte>(0));
|
||||
entityData->define(ID_FLAGS, static_cast<BYTE>(0));
|
||||
}
|
||||
|
||||
|
||||
@@ -463,11 +463,11 @@ void Arrow::addAdditonalSaveData(CompoundTag *tag)
|
||||
tag->putShort(L"xTile", static_cast<short>(xTile));
|
||||
tag->putShort(L"yTile", static_cast<short>(yTile));
|
||||
tag->putShort(L"zTile", static_cast<short>(zTile));
|
||||
tag->putByte(L"inTile", static_cast<byte>(lastTile));
|
||||
tag->putByte(L"inData", static_cast<byte>(lastData));
|
||||
tag->putByte(L"shake", static_cast<byte>(shakeTime));
|
||||
tag->putByte(L"inGround", static_cast<byte>(inGround ? 1 : 0));
|
||||
tag->putByte(L"pickup", static_cast<byte>(pickup));
|
||||
tag->putByte(L"inTile", static_cast<BYTE>(lastTile));
|
||||
tag->putByte(L"inData", static_cast<BYTE>(lastData));
|
||||
tag->putByte(L"shake", static_cast<BYTE>(shakeTime));
|
||||
tag->putByte(L"inGround", static_cast<BYTE>(inGround ? 1 : 0));
|
||||
tag->putByte(L"pickup", static_cast<BYTE>(pickup));
|
||||
tag->putDouble(L"damage", baseDamage);
|
||||
}
|
||||
|
||||
@@ -549,19 +549,19 @@ bool Arrow::isAttackable()
|
||||
|
||||
void Arrow::setCritArrow(bool critArrow)
|
||||
{
|
||||
byte flags = entityData->getByte(ID_FLAGS);
|
||||
BYTE flags = entityData->getByte(ID_FLAGS);
|
||||
if (critArrow)
|
||||
{
|
||||
entityData->set(ID_FLAGS, static_cast<byte>(flags | FLAG_CRIT));
|
||||
entityData->set(ID_FLAGS, static_cast<BYTE>(flags | FLAG_CRIT));
|
||||
}
|
||||
else
|
||||
{
|
||||
entityData->set(ID_FLAGS, static_cast<byte>(flags & ~FLAG_CRIT));
|
||||
entityData->set(ID_FLAGS, static_cast<BYTE>(flags & ~FLAG_CRIT));
|
||||
}
|
||||
}
|
||||
|
||||
bool Arrow::isCritArrow()
|
||||
{
|
||||
byte flags = entityData->getByte(ID_FLAGS);
|
||||
BYTE flags = entityData->getByte(ID_FLAGS);
|
||||
return (flags & FLAG_CRIT) != 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user