mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-24 23:23:52 +00:00
Initial commit
This commit is contained in:
parent
def8cb4153
commit
b691c43c44
19437 changed files with 4363922 additions and 0 deletions
41
Minecraft.World/TakeItemEntityPacket.cpp
Normal file
41
Minecraft.World/TakeItemEntityPacket.cpp
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#include "stdafx.h"
|
||||
#include <iostream>
|
||||
#include "InputOutputStream.h"
|
||||
#include "PacketListener.h"
|
||||
#include "TakeItemEntityPacket.h"
|
||||
|
||||
|
||||
|
||||
TakeItemEntityPacket::TakeItemEntityPacket()
|
||||
{
|
||||
itemId = -1;
|
||||
playerId = -1;
|
||||
}
|
||||
|
||||
TakeItemEntityPacket::TakeItemEntityPacket(int itemId, int playerId)
|
||||
{
|
||||
this->itemId = itemId;
|
||||
this->playerId = playerId;
|
||||
}
|
||||
|
||||
void TakeItemEntityPacket::read(DataInputStream *dis) //throws IOException
|
||||
{
|
||||
itemId = dis->readInt();
|
||||
playerId = dis->readInt();
|
||||
}
|
||||
|
||||
void TakeItemEntityPacket::write(DataOutputStream *dos) //throws IOException
|
||||
{
|
||||
dos->writeInt(itemId);
|
||||
dos->writeInt(playerId);
|
||||
}
|
||||
|
||||
void TakeItemEntityPacket::handle(PacketListener *listener)
|
||||
{
|
||||
listener->handleTakeItemEntity(shared_from_this());
|
||||
}
|
||||
|
||||
int TakeItemEntityPacket::getEstimatedSize()
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue