mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 10:53:41 +00:00
39 lines
837 B
C++
39 lines
837 B
C++
#include "../../Build/stdafx.h"
|
|
#include "../../Headers/net.minecraft.world.effect.h"
|
|
#include "../../IO/Streams/InputOutputStream.h"
|
|
#include "PacketListener.h"
|
|
#include "RemoveMobEffectPacket.h"
|
|
|
|
|
|
|
|
RemoveMobEffectPacket::RemoveMobEffectPacket()
|
|
{
|
|
}
|
|
|
|
RemoveMobEffectPacket::RemoveMobEffectPacket(int entityId, MobEffectInstance *effect)
|
|
{
|
|
this->entityId = entityId;
|
|
this->effectId = (uint8_t) (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;
|
|
} |