diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b65870..5e39af5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,6 @@ PROJECT(mcmap LANGUAGES CXX VERSION 3.0.1) SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) OPTION(DEBUG_BUILD "Debug build" OFF) -OPTION(SNAPSHOT "Support snapshot versions" OFF) IF(STATIC_BUILD) SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a") @@ -63,10 +62,6 @@ ELSE() ADD_COMPILE_OPTIONS(-O3) ENDIF() -IF(SNAPSHOT) - ADD_DEFINITIONS(-DSNAPSHOT_SUPPORT) -ENDIF() - IF(WIN32) # 100M stack + 3.5G heap on windows SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:104857600 /HEAP:3758096384") diff --git a/README.md b/README.md index 2becef5..9c22d70 100644 --- a/README.md +++ b/README.md @@ -222,18 +222,6 @@ cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DSTATIC_BUILD=1^ You can also download and set up [Ubuntu on windows](https://ubuntu.com/tutorials/tutorial-ubuntu-on-windows#1-overview) then the steps are the same as Linux/Ubuntu. -### Snapshot support - -Snapshots are unsupported by default. One can enable support by using the `SNAPSHOT` `CMake` option. In linux/macOS: -``` -git clone https://github.com/spoutn1k/mcmap -mkdir -p mcmap/build && cd mcmap/build -cmake .. -DSNAPSHOT=1 -make -j -``` - -On Windows, this will depend on the software you are using to compile `mcmap`. - ## Troubleshooting ### Compilation fails diff --git a/src/chunk.cpp b/src/chunk.cpp index fab70f3..10fd6b5 100644 --- a/src/chunk.cpp +++ b/src/chunk.cpp @@ -8,10 +8,7 @@ namespace mcmap { namespace versions { std::map> assert = { - {3465, assert_versions::v3465}, {2844, assert_versions::v2844}, -#ifdef SNAPSHOT_SUPPORT - {2840, assert_versions::v2840}, -#endif + {3458, assert_versions::v3458}, {2844, assert_versions::v2844}, {1976, assert_versions::v1976}, {1628, assert_versions::v1628}, {0, assert_versions::catchall}, }; diff --git a/src/chunk_format_versions/assert.cpp b/src/chunk_format_versions/assert.cpp index 6ea4e4d..43ffc13 100644 --- a/src/chunk_format_versions/assert.cpp +++ b/src/chunk_format_versions/assert.cpp @@ -3,8 +3,8 @@ namespace mcmap { namespace versions { namespace assert_versions { -bool v3465(const nbt::NBT &chunk) { - // Snapshot 21w43a +bool v3458(const nbt::NBT &chunk) { + // Minecraft 1.20-pre5, randomly changing things return chunk.contains("sections") // No sections mean no blocks && chunk.contains("Status") // Ensure the status is `minecraft:full` && chunk["Status"].get() == "minecraft:full"; @@ -17,16 +17,6 @@ bool v2844(const nbt::NBT &chunk) { && chunk["Status"].get() == "full"; } -#ifdef SNAPSHOT_SUPPORT -bool v2840(const nbt::NBT &chunk) { - // Snapshot 21w42a - return chunk.contains("Level") && // Level data is required - chunk["Level"].contains("Sections") // No sections mean no blocks - && chunk["Level"].contains("Status") // Ensure the status is `full` - && chunk["Level"]["Status"].get() == "full"; -} -#endif - bool v1976(const nbt::NBT &chunk) { // From 1.14 onwards return chunk.contains("Level") // Level data is required diff --git a/src/chunk_format_versions/assert.hpp b/src/chunk_format_versions/assert.hpp index bc94f68..a40c938 100644 --- a/src/chunk_format_versions/assert.hpp +++ b/src/chunk_format_versions/assert.hpp @@ -3,14 +3,10 @@ namespace mcmap { namespace versions { namespace assert_versions { -bool v3465(const nbt::NBT &chunk); +bool v3458(const nbt::NBT &chunk); bool v2844(const nbt::NBT &chunk); -#ifdef SNAPSHOT_SUPPORT -bool v2840(const nbt::NBT &chunk); -#endif - bool v1976(const nbt::NBT &chunk); bool v1628(const nbt::NBT &chunk); diff --git a/src/mcmap.cpp b/src/mcmap.cpp index 06ff741..ac9cb4a 100644 --- a/src/mcmap.cpp +++ b/src/mcmap.cpp @@ -184,9 +184,6 @@ std::map compilation_options() { #endif #ifdef DEBUG_BUILD {"Debug", "Enabled"}, -#endif -#ifdef SNAPSHOT_SUPPORT - {"Snapshot compatibility", "Enabled"}, #endif };