mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-28 14:55:26 +00:00
chore: format Minecraft.World
This commit is contained in:
@@ -5,38 +5,30 @@
|
||||
#include "PacketListener.h"
|
||||
#include "AnimatePacket.h"
|
||||
|
||||
|
||||
|
||||
AnimatePacket::AnimatePacket()
|
||||
{
|
||||
id = -1;
|
||||
action = 0;
|
||||
AnimatePacket::AnimatePacket() {
|
||||
id = -1;
|
||||
action = 0;
|
||||
}
|
||||
|
||||
AnimatePacket::AnimatePacket(std::shared_ptr<Entity> e, int action)
|
||||
{
|
||||
id = e->entityId;
|
||||
this->action = action;
|
||||
AnimatePacket::AnimatePacket(std::shared_ptr<Entity> e, int action) {
|
||||
id = e->entityId;
|
||||
this->action = action;
|
||||
}
|
||||
|
||||
void AnimatePacket::read(DataInputStream *dis) //throws IOException
|
||||
void AnimatePacket::read(DataInputStream* dis) // throws IOException
|
||||
{
|
||||
id = dis->readInt();
|
||||
action = static_cast<int>(dis->readByte());
|
||||
id = dis->readInt();
|
||||
action = static_cast<int>(dis->readByte());
|
||||
}
|
||||
|
||||
void AnimatePacket::write(DataOutputStream *dos) //throws IOException
|
||||
void AnimatePacket::write(DataOutputStream* dos) // throws IOException
|
||||
{
|
||||
dos->writeInt(id);
|
||||
dos->writeByte(static_cast<uint8_t>(action));
|
||||
dos->writeInt(id);
|
||||
dos->writeByte(static_cast<uint8_t>(action));
|
||||
}
|
||||
|
||||
void AnimatePacket::handle(PacketListener *listener)
|
||||
{
|
||||
listener->handleAnimate(shared_from_this());
|
||||
void AnimatePacket::handle(PacketListener* listener) {
|
||||
listener->handleAnimate(shared_from_this());
|
||||
}
|
||||
|
||||
int AnimatePacket::getEstimatedSize()
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
int AnimatePacket::getEstimatedSize() { return 5; }
|
||||
|
||||
Reference in New Issue
Block a user