chore: format Minecraft.World

This commit is contained in:
Tropical
2026-03-13 17:06:56 -05:00
parent bd6284025d
commit 33d0737d1d
1511 changed files with 108661 additions and 115521 deletions

View File

@@ -4,12 +4,11 @@
#include "PacketListener.h"
#include "GameEventPacket.h"
const int GameEventPacket::NO_RESPAWN_BED_AVAILABLE = 0;
const int GameEventPacket::START_RAINING = 1;
const int GameEventPacket::STOP_RAINING = 2;
const int GameEventPacket::CHANGE_GAME_MODE = 3; // 1.8.2
const int GameEventPacket::WIN_GAME = 4; // 1.0.1
const int GameEventPacket::CHANGE_GAME_MODE = 3; // 1.8.2
const int GameEventPacket::WIN_GAME = 4; // 1.0.1
const int GameEventPacket::DEMO_EVENT = 5;
const int GameEventPacket::DEMO_PARAM_INTRO = 0;
@@ -21,38 +20,33 @@ const int GameEventPacket::DEMO_PARAM_HINT_3 = 103;
const int GameEventPacket::START_SAVING = 10;
const int GameEventPacket::STOP_SAVING = 11;
const int GameEventPacket::EVENT_LANGUAGE_ID[EVENT_LANGUAGE_ID_LENGTH] = { IDS_TILE_BED_NOT_VALID, -1, -1, IDS_GAME_MODE_CHANGED, -1, -1 };
const int GameEventPacket::EVENT_LANGUAGE_ID[EVENT_LANGUAGE_ID_LENGTH] = {
IDS_TILE_BED_NOT_VALID, -1, -1, IDS_GAME_MODE_CHANGED, -1, -1};
GameEventPacket::GameEventPacket()
{
this->_event = 0;
this->param = 0;
GameEventPacket::GameEventPacket() {
this->_event = 0;
this->param = 0;
}
GameEventPacket::GameEventPacket(int _event, int param)
{
this->_event = _event;
this->param = param;
GameEventPacket::GameEventPacket(int _event, int param) {
this->_event = _event;
this->param = param;
}
void GameEventPacket::read(DataInputStream *dis) //throws IOException
void GameEventPacket::read(DataInputStream* dis) // throws IOException
{
_event = (int)dis->readByte();
param = (int)dis->readByte();
_event = (int)dis->readByte();
param = (int)dis->readByte();
}
void GameEventPacket::write(DataOutputStream *dos) //throws IOException
void GameEventPacket::write(DataOutputStream* dos) // throws IOException
{
dos->writeByte((uint8_t)_event);
dos->writeByte((uint8_t)param);
dos->writeByte((uint8_t)_event);
dos->writeByte((uint8_t)param);
}
void GameEventPacket::handle(PacketListener *listener)
{
listener->handleGameEvent(shared_from_this());
void GameEventPacket::handle(PacketListener* listener) {
listener->handleGameEvent(shared_from_this());
}
int GameEventPacket::getEstimatedSize()
{
return 2;
}
int GameEventPacket::getEstimatedSize() { return 2; }