diff --git a/LICENSE b/LICENSE index e1c8c7f..6f089e6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Nooz, TheBrokenRail, Bigjango13, and other contributors +Copyright (c) 2024 Nooz, TheBrokenRail, Bigjango13, and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/VERSION b/VERSION index aedc15b..56fa706 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.5.3 +2.5.3-1 diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 8bc4b97..ed6db9e 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -5,6 +5,15 @@ Every new MCPI++ release starting from v2.2.11 is listed here. This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres To [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.5.3-1] - 2024-1-05 + +### Changed +- Updated app icon + +### Fixed +- Bug Casuing Blocks to Not Appear In Multiplayer + * + ## [2.5.3] - 2023-12-26 ### Added diff --git a/images/icon-old.png b/images/icon-old.png new file mode 100644 index 0000000..8b49331 Binary files /dev/null and b/images/icon-old.png differ diff --git a/images/icon.png b/images/icon.png index 8b49331..28bb920 100644 Binary files a/images/icon.png and b/images/icon.png differ diff --git a/launcher/src/client/available-feature-flags b/launcher/src/client/available-feature-flags index 9504bc4..21409d1 100644 --- a/launcher/src/client/available-feature-flags +++ b/launcher/src/client/available-feature-flags @@ -50,4 +50,5 @@ FALSE Disable Block Tinting TRUE Disable Hostile AI In Creative Mode TRUE Load Custom Skins TRUE 3D Chest Model -TRUE Replace Block Highlight With Outline \ No newline at end of file +TRUE Replace Block Highlight With Outline +TRUE Disable Multiplayer Chunk Compression \ No newline at end of file diff --git a/mods/src/misc/misc.c b/mods/src/misc/misc.c index 44d7e3d..5ed49b6 100644 --- a/mods/src/misc/misc.c +++ b/mods/src/misc/misc.c @@ -689,6 +689,15 @@ void init_misc() { } patch_address((void *) 0x115b48, (void *) ChestTileEntity_shouldSave_injection); + // Disable chunk compression in multiplayer; https://github.com/NoozAbooz/mcpi-reborn-extended/issues/39 + if (feature_has("Disable Multiplayer Chunk Compression", server_auto)) { + unsigned char nop[4] = {0x00, 0xf0, 0x20, 0xe3}; // "nop" + patch((void *) 0x717c4, nop); + + unsigned char mv_r3_ff[4] = {0xff, 0x30, 0xa0, 0xe3}; // "mov r3, #0xff" + patch((void *) 0x7178c, mv_r3_ff); + } + #ifndef MCPI_HEADLESS_MODE // Replace Block Highlight With Outline if (feature_has("Replace Block Highlight With Outline", server_disabled)) { diff --git a/mods/src/server/server.cpp b/mods/src/server/server.cpp index 345cc28..6c20aea 100644 --- a/mods/src/server/server.cpp +++ b/mods/src/server/server.cpp @@ -62,6 +62,7 @@ static ServerProperties &get_server_properties() { #define DEFAULT_WHITELIST "false" #define DEFAULT_DEATH_MESSAGES "true" #define DEFAULT_GENERATE_CAVES "true" +#define DEFAULT_DISABLE_COMPRESSION "true" // Get World Name static std::string get_world_name() { @@ -497,6 +498,9 @@ static const char *get_features() { if (get_server_properties().get_bool("generate-caves", DEFAULT_GENERATE_CAVES)) { features += "Generate Caves|"; } + if (get_server_properties().get_bool("disable-compression", DEFAULT_DISABLE_COMPRESSION)) { + features += "Disable Multiplayer Chunk Compression|"; + } } return features.c_str(); } @@ -548,6 +552,8 @@ static void server_init() { properties_file_output << "death-messages=" DEFAULT_DEATH_MESSAGES "\n"; properties_file_output << "# Generate Caves\n"; properties_file_output << "generate-caves=" DEFAULT_GENERATE_CAVES "\n"; + properties_file_output << "# Disable Chunk Compression (helpful if blocks are missing)\n"; + properties_file_output << "disable-compression=" DEFAULT_DISABLE_COMPRESSION "\n"; properties_file_output.close(); // Re-Open File properties_file = std::ifstream(file);