From 64a44b5385e1f6e09ed383ace88886d84e0f01ed Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Fri, 10 Apr 2026 11:46:33 -0500 Subject: [PATCH] format it all --- targets/minecraft/client/BufferedImage.cpp | 2 +- .../minecraft/client/player/LocalPlayer.cpp | 2 +- targets/minecraft/locale/StringTable.cpp | 2 +- targets/minecraft/world/entity/Entity.cpp | 8 +++----- .../minecraft/world/entity/LivingEntity.cpp | 17 +++++++++-------- .../world/level/tile/entity/SignTileEntity.cpp | 2 +- targets/platform/input/sdl2/SDL2Input.cpp | 18 +++++++++--------- targets/platform/renderer/gl/GLRenderer.cpp | 11 ++++++----- targets/platform/stubs.h | 1 - 9 files changed, 31 insertions(+), 32 deletions(-) diff --git a/targets/minecraft/client/BufferedImage.cpp b/targets/minecraft/client/BufferedImage.cpp index 4d71aad6c..22ebdf4a9 100644 --- a/targets/minecraft/client/BufferedImage.cpp +++ b/targets/minecraft/client/BufferedImage.cpp @@ -6,8 +6,8 @@ #include #include -#include "platform/PlatformTypes.h" #include "minecraft/IGameServices.h" +#include "platform/PlatformTypes.h" #include "platform/fs/fs.h" #include "platform/renderer/renderer.h" #include "util/StringHelpers.h" diff --git a/targets/minecraft/client/player/LocalPlayer.cpp b/targets/minecraft/client/player/LocalPlayer.cpp index 4e8c4c701..45a09d9fb 100644 --- a/targets/minecraft/client/player/LocalPlayer.cpp +++ b/targets/minecraft/client/player/LocalPlayer.cpp @@ -28,7 +28,6 @@ #include "minecraft/world/item/Item.h" #include "minecraft/world/level/tile/Tile.h" // 4J Stu - Added for tutorial callbacks -#include "platform/PlatformTypes.h" #include "Pos.h" #include "app/common/Audio/ConsoleSoundEngine.h" #include "app/common/Audio/SoundTypes.h" @@ -79,6 +78,7 @@ #include "minecraft/world/phys/HitResult.h" #include "minecraft/world/phys/Vec3.h" #include "minecraft/world/tutorial/ITutorial.h" +#include "platform/PlatformTypes.h" #include "platform/input/input.h" #include "platform/profile/ProfileConstants.h" #include "platform/profile/profile.h" diff --git a/targets/minecraft/locale/StringTable.cpp b/targets/minecraft/locale/StringTable.cpp index 39b0a1a82..e8cb41a36 100644 --- a/targets/minecraft/locale/StringTable.cpp +++ b/targets/minecraft/locale/StringTable.cpp @@ -1,8 +1,8 @@ #include "minecraft/locale/StringTable.h" +#include #include #include -#include #include "java/InputOutputStream/ByteArrayInputStream.h" #include "java/InputOutputStream/DataInputStream.h" diff --git a/targets/minecraft/world/entity/Entity.cpp b/targets/minecraft/world/entity/Entity.cpp index 7af9d16e4..a74fe68ca 100644 --- a/targets/minecraft/world/entity/Entity.cpp +++ b/targets/minecraft/world/entity/Entity.cpp @@ -685,13 +685,12 @@ void Entity::move(double xa, double ya, double za, onGround && isSneaking() && instanceof(eTYPE_PLAYER); auto shared = shared_from_this(); - + if (isPlayerSneaking) { double d = 0.05; AABB translated_bb = bb.move(xa, -1.0, 0.0); - while (xa != 0 && - level->getCubes(shared, &translated_bb)->empty()) { + while (xa != 0 && level->getCubes(shared, &translated_bb)->empty()) { if (xa < d && xa >= -d) xa = 0; else if (xa > 0) @@ -702,8 +701,7 @@ void Entity::move(double xa, double ya, double za, } translated_bb = bb.move(0, -1.0, za); - while (za != 0 && - level->getCubes(shared, &translated_bb)->empty()) { + while (za != 0 && level->getCubes(shared, &translated_bb)->empty()) { if (za < d && za >= -d) za = 0; else if (za > 0) diff --git a/targets/minecraft/world/entity/LivingEntity.cpp b/targets/minecraft/world/entity/LivingEntity.cpp index 0299b688a..e5866814f 100644 --- a/targets/minecraft/world/entity/LivingEntity.cpp +++ b/targets/minecraft/world/entity/LivingEntity.cpp @@ -1244,7 +1244,7 @@ void LivingEntity::jumpFromGround() { } void LivingEntity::travel(float xa, float ya) { - // AP - dynamic_pointer_cast is a non-trivial call, use raw pointer instead + // AP - dynamic_pointer_cast is a non-trivial call, use raw pointer instead Player* thisPlayer = nullptr; if (this->instanceof(eTYPE_PLAYER)) { thisPlayer = (Player*)this; @@ -1280,10 +1280,11 @@ void LivingEntity::travel(float xa, float ya) { int frictionTile = 0; if (onGround) { friction = 0.6f * 0.91f; - frictionTile = level->getTile(Mth::floor(x), Mth::floor(bb.y0) - 1, Mth::floor(z)); - if (frictionTile > 0) { - friction = Tile::tiles[frictionTile]->friction * 0.91f; - } + frictionTile = level->getTile(Mth::floor(x), Mth::floor(bb.y0) - 1, + Mth::floor(z)); + if (frictionTile > 0) { + friction = Tile::tiles[frictionTile]->friction * 0.91f; + } } float friction2 = (0.6f * 0.6f * 0.91f * 0.91f * 0.6f * 0.91f) / @@ -1301,9 +1302,9 @@ void LivingEntity::travel(float xa, float ya) { friction = 0.91f; if (onGround) { friction = 0.6f * 0.91f; - if (frictionTile > 0) { - friction = Tile::tiles[frictionTile]->friction * 0.91f; - } + if (frictionTile > 0) { + friction = Tile::tiles[frictionTile]->friction * 0.91f; + } } if (onLadder()) { float max = 0.15f; diff --git a/targets/minecraft/world/level/tile/entity/SignTileEntity.cpp b/targets/minecraft/world/level/tile/entity/SignTileEntity.cpp index 9eb7abebe..a57bf4a5a 100644 --- a/targets/minecraft/world/level/tile/entity/SignTileEntity.cpp +++ b/targets/minecraft/world/level/tile/entity/SignTileEntity.cpp @@ -2,13 +2,13 @@ #include -#include "platform/PlatformTypes.h" #include "minecraft/client/Minecraft.h" #include "minecraft/network/packet/SignUpdatePacket.h" #include "minecraft/server/level/ServerLevel.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/entity/TileEntity.h" #include "nbt/CompoundTag.h" +#include "platform/PlatformTypes.h" class Player; diff --git a/targets/platform/input/sdl2/SDL2Input.cpp b/targets/platform/input/sdl2/SDL2Input.cpp index 212495de5..ba35895a6 100644 --- a/targets/platform/input/sdl2/SDL2Input.cpp +++ b/targets/platform/input/sdl2/SDL2Input.cpp @@ -1,5 +1,14 @@ #include "SDL2Input.h" +#include +#include +#include + +#include +#include + +#include "../../PlatformTypes.h" +#include "../InputConstants.h" #include "SDL2/SDL.h" #include "SDL2/SDL_events.h" #include "SDL2/SDL_gamecontroller.h" @@ -10,15 +19,6 @@ #include "SDL2/SDL_stdinc.h" #include "SDL2/SDL_video.h" #include "SDL2/begin_code.h" -#include -#include -#include - -#include -#include - -#include "../../PlatformTypes.h" -#include "../InputConstants.h" namespace platform_internal { IPlatformInput& PlatformInput_get() { diff --git a/targets/platform/renderer/gl/GLRenderer.cpp b/targets/platform/renderer/gl/GLRenderer.cpp index 1eedd9a4e..0a9b87b7d 100644 --- a/targets/platform/renderer/gl/GLRenderer.cpp +++ b/targets/platform/renderer/gl/GLRenderer.cpp @@ -1,6 +1,5 @@ #include "GLRenderer.h" -#include "platform/PlatformTypes.h" #include "SDL.h" #include "SDL_error.h" #include "SDL_events.h" @@ -9,6 +8,7 @@ #include "java/ByteBuffer.h" #include "java/FloatBuffer.h" #include "java/IntBuffer.h" +#include "platform/PlatformTypes.h" #include "platform/renderer/renderer.h" // undefine macros from header to avoid argument mismatch @@ -41,12 +41,9 @@ #include "stb_image.h" #define GLM_FORCE_RADIANS -#include "glm/glm.hpp" -#include "glm/gtc/matrix_transform.hpp" -#include "glm/gtc/type_ptr.hpp" - #include #include + #include #include #include @@ -54,6 +51,10 @@ #include #include +#include "glm/glm.hpp" +#include "glm/gtc/matrix_transform.hpp" +#include "glm/gtc/type_ptr.hpp" + namespace platform_internal { IPlatformRenderer& PlatformRenderer_get() { static GLRenderer instance; diff --git a/targets/platform/stubs.h b/targets/platform/stubs.h index ef34eeed5..65bc7ccfa 100644 --- a/targets/platform/stubs.h +++ b/targets/platform/stubs.h @@ -2,7 +2,6 @@ #include #include - #include #include "java/File.h"