mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-25 20:16:26 +00:00
chore: format Minecraft.World
This commit is contained in:
@@ -5,62 +5,52 @@
|
||||
#include "SetHealthPacket.h"
|
||||
#include "../../../Minecraft.Client/Platform/Common/Telemetry/TelemetryManager.h"
|
||||
|
||||
SetHealthPacket::SetHealthPacket() {
|
||||
this->health = 0;
|
||||
this->food = 0;
|
||||
this->saturation = 0;
|
||||
|
||||
SetHealthPacket::SetHealthPacket()
|
||||
{
|
||||
this->health = 0;
|
||||
this->food = 0;
|
||||
this->saturation = 0;
|
||||
|
||||
this->damageSource = eTelemetryChallenges_Unknown;
|
||||
this->damageSource = eTelemetryChallenges_Unknown;
|
||||
}
|
||||
|
||||
SetHealthPacket::SetHealthPacket(int health, int food, float saturation, ETelemetryChallenges damageSource)
|
||||
{
|
||||
this->health = health;
|
||||
this->food = food;
|
||||
this->saturation = saturation;
|
||||
// this.exhaustion = exhaustion; // 4J - Original comment
|
||||
SetHealthPacket::SetHealthPacket(int health, int food, float saturation,
|
||||
ETelemetryChallenges damageSource) {
|
||||
this->health = health;
|
||||
this->food = food;
|
||||
this->saturation = saturation;
|
||||
// this.exhaustion = exhaustion; // 4J - Original comment
|
||||
|
||||
this->damageSource = damageSource;
|
||||
this->damageSource = damageSource;
|
||||
}
|
||||
|
||||
void SetHealthPacket::read(DataInputStream *dis) //throws IOException
|
||||
void SetHealthPacket::read(DataInputStream* dis) // throws IOException
|
||||
{
|
||||
health = dis->readShort();
|
||||
food = dis->readShort();
|
||||
saturation = dis->readFloat();
|
||||
// exhaustion = dis.readFloat();
|
||||
health = dis->readShort();
|
||||
food = dis->readShort();
|
||||
saturation = dis->readFloat();
|
||||
// exhaustion = dis.readFloat();
|
||||
|
||||
damageSource = (ETelemetryChallenges)dis->readByte();
|
||||
damageSource = (ETelemetryChallenges)dis->readByte();
|
||||
}
|
||||
|
||||
void SetHealthPacket::write(DataOutputStream *dos) //throws IOException
|
||||
void SetHealthPacket::write(DataOutputStream* dos) // throws IOException
|
||||
{
|
||||
dos->writeShort(health);
|
||||
dos->writeShort(food);
|
||||
dos->writeFloat(saturation);
|
||||
// dos.writeFloat(exhaustion);
|
||||
dos->writeShort(health);
|
||||
dos->writeShort(food);
|
||||
dos->writeFloat(saturation);
|
||||
// dos.writeFloat(exhaustion);
|
||||
|
||||
dos->writeByte(damageSource);
|
||||
dos->writeByte(damageSource);
|
||||
}
|
||||
|
||||
void SetHealthPacket::handle(PacketListener *listener)
|
||||
{
|
||||
listener->handleSetHealth(shared_from_this());
|
||||
void SetHealthPacket::handle(PacketListener* listener) {
|
||||
listener->handleSetHealth(shared_from_this());
|
||||
}
|
||||
|
||||
int SetHealthPacket::getEstimatedSize()
|
||||
{
|
||||
return 9;
|
||||
}
|
||||
int SetHealthPacket::getEstimatedSize() { return 9; }
|
||||
|
||||
bool SetHealthPacket::canBeInvalidated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
bool SetHealthPacket::canBeInvalidated() { return true; }
|
||||
|
||||
bool SetHealthPacket::isInvalidatedBy(std::shared_ptr<Packet> packet)
|
||||
{
|
||||
return true;
|
||||
bool SetHealthPacket::isInvalidatedBy(std::shared_ptr<Packet> packet) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user