mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-05-26 12:44:36 +00:00
* Remove stdafx.h and some <unordered_set> includes * Update Minecraft Server Defines and remove more unused folders/files * Unbloat stdafx.h from Minecraft.World
38 lines
781 B
C++
38 lines
781 B
C++
#include "net.minecraft.world.effect.h"
|
|
#include "InputOutputStream.h"
|
|
#include "PacketListener.h"
|
|
#include "RemoveMobEffectPacket.h"
|
|
|
|
|
|
|
|
RemoveMobEffectPacket::RemoveMobEffectPacket()
|
|
{
|
|
}
|
|
|
|
RemoveMobEffectPacket::RemoveMobEffectPacket(int entityId, MobEffectInstance *effect)
|
|
{
|
|
this->entityId = entityId;
|
|
this->effectId = static_cast<BYTE>(effect->getId() & 0xff);
|
|
}
|
|
|
|
void RemoveMobEffectPacket::read(DataInputStream *dis)
|
|
{
|
|
entityId = dis->readInt();
|
|
effectId = dis->readByte();
|
|
}
|
|
|
|
void RemoveMobEffectPacket::write(DataOutputStream *dos)
|
|
{
|
|
dos->writeInt(entityId);
|
|
dos->writeByte(effectId);
|
|
}
|
|
|
|
void RemoveMobEffectPacket::handle(PacketListener *listener)
|
|
{
|
|
listener->handleRemoveMobEffect(shared_from_this());
|
|
}
|
|
|
|
int RemoveMobEffectPacket::getEstimatedSize()
|
|
{
|
|
return 5;
|
|
} |