mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-17 15:13:50 +00:00
Initial commit
This commit is contained in:
parent
def8cb4153
commit
b691c43c44
19437 changed files with 4363922 additions and 0 deletions
39
Minecraft.World/RemoveMobEffectPacket.cpp
Normal file
39
Minecraft.World/RemoveMobEffectPacket.cpp
Normal file
|
|
@ -0,0 +1,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 = (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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue