mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-25 06:15:21 +00:00
chore: format Minecraft.World
This commit is contained in:
@@ -5,47 +5,39 @@
|
||||
#include "../../Headers/net.minecraft.world.entity.h"
|
||||
#include "PlayerCommandPacket.h"
|
||||
|
||||
const int PlayerCommandPacket::START_SNEAKING = 1;
|
||||
const int PlayerCommandPacket::STOP_SNEAKING = 2;
|
||||
const int PlayerCommandPacket::STOP_SLEEPING = 3;
|
||||
const int PlayerCommandPacket::START_SPRINTING = 4;
|
||||
const int PlayerCommandPacket::STOP_SPRINTING = 5;
|
||||
const int PlayerCommandPacket::START_IDLEANIM = 6;
|
||||
const int PlayerCommandPacket::STOP_IDLEANIM = 7;
|
||||
|
||||
|
||||
const int PlayerCommandPacket::START_SNEAKING = 1;
|
||||
const int PlayerCommandPacket::STOP_SNEAKING = 2;
|
||||
const int PlayerCommandPacket::STOP_SLEEPING = 3;
|
||||
const int PlayerCommandPacket::START_SPRINTING = 4;
|
||||
const int PlayerCommandPacket::STOP_SPRINTING = 5;
|
||||
const int PlayerCommandPacket::START_IDLEANIM = 6;
|
||||
const int PlayerCommandPacket::STOP_IDLEANIM = 7;
|
||||
|
||||
|
||||
PlayerCommandPacket::PlayerCommandPacket()
|
||||
{
|
||||
id = -1;
|
||||
action = 0;
|
||||
PlayerCommandPacket::PlayerCommandPacket() {
|
||||
id = -1;
|
||||
action = 0;
|
||||
}
|
||||
|
||||
PlayerCommandPacket::PlayerCommandPacket(std::shared_ptr<Entity> e, int action)
|
||||
{
|
||||
id = e->entityId;
|
||||
this->action = action;
|
||||
PlayerCommandPacket::PlayerCommandPacket(std::shared_ptr<Entity> e,
|
||||
int action) {
|
||||
id = e->entityId;
|
||||
this->action = action;
|
||||
}
|
||||
|
||||
void PlayerCommandPacket::read(DataInputStream *dis) //throws IOException
|
||||
void PlayerCommandPacket::read(DataInputStream* dis) // throws IOException
|
||||
{
|
||||
id = dis->readInt();
|
||||
action = dis->readByte();
|
||||
id = dis->readInt();
|
||||
action = dis->readByte();
|
||||
}
|
||||
|
||||
void PlayerCommandPacket::write(DataOutputStream *dos) //throws IOException
|
||||
void PlayerCommandPacket::write(DataOutputStream* dos) // throws IOException
|
||||
{
|
||||
dos->writeInt(id);
|
||||
dos->writeByte(action);
|
||||
dos->writeInt(id);
|
||||
dos->writeByte(action);
|
||||
}
|
||||
|
||||
void PlayerCommandPacket::handle(PacketListener *listener)
|
||||
{
|
||||
listener->handlePlayerCommand(shared_from_this());
|
||||
void PlayerCommandPacket::handle(PacketListener* listener) {
|
||||
listener->handlePlayerCommand(shared_from_this());
|
||||
}
|
||||
|
||||
int PlayerCommandPacket::getEstimatedSize()
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
int PlayerCommandPacket::getEstimatedSize() { return 5; }
|
||||
|
||||
Reference in New Issue
Block a user