blob: 7e2d7c84fe83394e67cdd252d4c927d677ba8d6d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#include "stdafx.h"
#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;
}
|