diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7156a3b8..756d36c25 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ image: gradle:eclipse-temurin # all stages need to be defined here stages: + - build_19 - build_18_2 - build_18_1 - build_17_1 @@ -119,6 +120,28 @@ build_18_2: - cache/ allow_failure: true +# 1.19 build +build_19: + stage: build_19 + script: + - ./gradlew deleteMerged --gradle-user-home cache/; + - ./gradlew build -PmcVer=1.19 --gradle-user-home cache/; + - ./gradlew merge --gradle-user-home cache/; + image: eclipse-temurin:17 + artifacts: + name: "Merged_NightlyBuild_1_19-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}" + paths: + - Merged + expire_in: 1 day + when: always + cache: + key: "gradleCache" + policy: pull-push + paths: + - .gradle + - cache/ + allow_failure: true + # unused deployment stage #deploy: diff --git a/1.16.5.properties b/1.16.5.properties index 7812bfaec..6137e9f37 100644 --- a/1.16.5.properties +++ b/1.16.5.properties @@ -14,8 +14,8 @@ architectury_version=1.31.61 starlight_version_fabric= phosphor_version_fabric= lithium_version=mc1.16.5-0.6.6 - sodium_version=3488820 - iris_version=1.16.x-v1.1.4 + sodium_version=mc1.16.5-0.2.0 + iris_version=1.16.x-v1.2.5 bclib_version= immersive_portals_version = diff --git a/1.17.1.properties b/1.17.1.properties index 25fed1a2b..f914d74ff 100644 --- a/1.17.1.properties +++ b/1.17.1.properties @@ -14,8 +14,8 @@ architectury_version=2.10.9 starlight_version_fabric=3442770 phosphor_version_fabric= lithium_version=mc1.17.1-0.7.5 - sodium_version=3605275 - iris_version=1.17.x-v1.1.4 + sodium_version=mc1.17.1-0.3.4 + iris_version=1.17.x-v1.2.5 bclib_version= immersive_portals_version = 0.14-1.17 diff --git a/1.18.1.properties b/1.18.1.properties index 32b9b8062..911e6bd00 100644 --- a/1.18.1.properties +++ b/1.18.1.properties @@ -14,8 +14,8 @@ architectury_version=3.9.57 starlight_version_fabric=3554912 phosphor_version_fabric=3573395 lithium_version=mc1.18.1-0.7.7 - sodium_version=3605309 - iris_version=1.18.x-v1.1.4 + sodium_version=mc1.18.1-0.4.0-alpha6 + iris_version=1.18.x-v1.2.5 bclib_version=1.2.5 immersive_portals_version = v1.0.4-1.18 diff --git a/1.18.2.properties b/1.18.2.properties index 259cb8d00..308a8051c 100644 --- a/1.18.2.properties +++ b/1.18.2.properties @@ -14,10 +14,10 @@ architectury_version=4.4.59 starlight_version_fabric=3667443 phosphor_version_fabric=3573395 lithium_version=mc1.18.2-0.7.9 - sodium_version=3669187 - iris_version=1.18.x-v1.2.2 + sodium_version=mc1.18.2-0.4.1 + iris_version=1.18.x-v1.2.5 immersive_portals_version = v1.0.4-1.18 - bclib_version=0 + bclib_version= # Fabric mod run # 0 = Don't enable and don't run @@ -33,7 +33,7 @@ architectury_version=4.4.59 # Forge loader forge_version=40.0.18 # Forge mod versions - starlight_version_forge=0 + starlight_version_forge= terraforged_version= # Forge mod run diff --git a/1.19.properties b/1.19.properties index 08c74643f..49bb0ce3e 100644 --- a/1.19.properties +++ b/1.19.properties @@ -6,8 +6,8 @@ parchment_version=2022.03.13 compatible_minecraft_versions=["1.19"] # Fabric loader -fabric_loader_version=0.14.6 -fabric_api_version=0.55.1+1.19 +fabric_loader_version=0.14.7 +fabric_api_version=0.55.3+1.19 # Fabric mod versions modmenu_version=4.0.0 starlight_version_fabric=0 @@ -30,7 +30,7 @@ fabric_api_version=0.55.1+1.19 enable_bclib=0 # Forge loader -forge_version=41.0.1 +forge_version=41.0.19 # Forge mod versions starlight_version_forge=0 terraforged_version= diff --git a/Readme.md b/Readme.md index f746e7247..5008788ab 100644 --- a/Readme.md +++ b/Readme.md @@ -12,19 +12,26 @@ allowing for an increased view distance without harming performance. Or in other words: this mod lets you see farther without turning your game into a slide show.\ If you want to see a quick demo, check out a video covering the mod here: -![Minecraft Level Of Detail (LOD) mod - Alpha 1.5](https://i.ytimg.com/vi_webp/H2tnvEVbO1c/mqdefault.webp) - +![Minecraft Level Of Detail (LOD) mod - Alpha 1.6.3](https://cdn.ko-fi.com/cdn/useruploads/png_ef4d209d-50d9-462f-b31f-92e42ec3e260cover.jpg?v=c1097a5b-029c-4484-bec3-80ff58c5d239) ### Versions This branch is for these versions of Minecraft +- 1.19 (WIP) - 1.18.2 - 1.18.1 & 1.18 - 1.17.1 & 1.17 - 1.16.5 & 1.16.4 Architectury version: 3.4-SNAPSHOT\ +Architectury loom version: 0.12.0-SNAPSHOT\ Java Compiler plugin: Manifold Preprocessor +#### 1.19 mods (WIP) +Forge version: 41.0.19\ +Fabric version: 0.14.7\ +Fabric API version: 0.55.3+1.19\ +Modmenu version: 4.0.0 + #### 1.18.2 mods Forge version: 40.0.18\ Fabric version: 0.13.3\ @@ -59,6 +66,7 @@ This version has been confirmed to work in IDE and Retail Minecraft with ether t #### Nightlly builds This mod has an autobuild system to automatically build the mod on each commit +- 1.19: https://gitlab.com/jeseibel/minecraft-lod-mod/-/jobs/artifacts/main/download?job=build_19 (WIP) - 1.18.2: https://gitlab.com/jeseibel/minecraft-lod-mod/-/jobs/artifacts/main/download?job=build_18_2 - 1.18.1: https://gitlab.com/jeseibel/minecraft-lod-mod/-/jobs/artifacts/main/download?job=build_18_1 - 1.17.1: https://gitlab.com/jeseibel/minecraft-lod-mod/-/jobs/artifacts/main/download?job=build_17_1 @@ -85,7 +93,8 @@ https://fabricmc.net/wiki/tutorial:setup 4. Import the project into eclipse ## Switching Versions -This branch support 4 built versions: +This branch support 5 built versions: + - 1.19 (WIP) - 1.18.2 - 1.18.1 (which also runs on 1.18) - 1.17.1 (which also runs on 1.17) diff --git a/build.gradle b/build.gradle index 362a3e2d8..a92b1605a 100644 --- a/build.gradle +++ b/build.gradle @@ -64,6 +64,7 @@ def writeBuildGradlePredefine(List mcVers, int mcIndex) { // Sets up the variables for Manifold in the code def loadProperties() { def defaultMcVersion = "1.18.2" +// def defaultMcVersion = "1.19" // For now use 1.18.2 as default until 1.19 is done def mcVersion = "" def mcVers = mcVersions.split(",") int mcIndex = -1 @@ -287,7 +288,7 @@ allprojects { p -> java_version : java_version ] // The left side is what gets replaced in the mod info and the right side is where to get it from in the gradle.properties - //TODO: Make Forge loader version also be relaced with non hardcoded value instead of "[36,41)" + //TODO: Make Forge loader version also be relaced with non hardcoded value instead of "[36,42)" inputs.properties replaceProperties replaceProperties.put 'project', project diff --git a/common/build.gradle b/common/build.gradle index 2d40e53e3..10f1ccd23 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -1,14 +1,5 @@ architectury { - common() -} - -// TODO: Remove "afterEvaluate {}" once we update architectury to 11 or higher -afterEvaluate { - tasks { - remapJar { - remapAccessWidener.set(false) - } - } + common(rootProject.enabled_platforms.split(",")) } dependencies { diff --git a/common/src/main/resources/1_19.lod.accesswidener b/common/src/main/resources/1_19.lod.accesswidener new file mode 100644 index 000000000..143356a82 --- /dev/null +++ b/common/src/main/resources/1_19.lod.accesswidener @@ -0,0 +1,47 @@ +accessWidener v1 named + + +# used when determining where to save files to +accessible field net/minecraft/world/level/storage/DimensionDataStorage dataFolder Ljava/io/File; + +# used when rendering +accessible field com/mojang/blaze3d/vertex/VertexBuffer indexCount I +accessible method net/minecraft/client/renderer/GameRenderer getFov (Lnet/minecraft/client/Camera;FZ)D + +# used for grabbing vanilla rendered chunks +accessible field net/minecraft/client/renderer/LevelRenderer renderChunkStorage Ljava/util/concurrent/atomic/AtomicReference; +accessible class net/minecraft/client/renderer/LevelRenderer$RenderChunkStorage +accessible class net/minecraft/client/renderer/LevelRenderer$RenderChunkInfo +accessible field net/minecraft/client/renderer/LevelRenderer$RenderChunkInfo chunk Lnet/minecraft/client/renderer/chunk/ChunkRenderDispatcher$RenderChunk; + +# lighting +accessible field net/minecraft/client/renderer/LightTexture lightPixels Lcom/mojang/blaze3d/platform/NativeImage; +accessible field net/minecraft/client/renderer/LightTexture lightTexture Lnet/minecraft/client/renderer/texture/DynamicTexture; +accessible field net/minecraft/world/level/lighting/LevelLightEngine blockEngine Lnet/minecraft/world/level/lighting/LayerLightEngine; +accessible field net/minecraft/world/level/lighting/LevelLightEngine skyEngine Lnet/minecraft/world/level/lighting/LayerLightEngine; + +# world generation +accessible method net/minecraft/world/level/levelgen/Heightmap setHeight (III)V +accessible field net/minecraft/world/level/biome/Biome generationSettings Lnet/minecraft/world/level/biome/BiomeGenerationSettings; +# accessible field net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator settings Lnet/minecraft/core/Holder; +accessible method net/minecraft/world/level/lighting/LayerLightEngine queueSectionData (JLnet/minecraft/world/level/chunk/DataLayer;Z)V +accessible method net/minecraft/server/level/ChunkMap readChunk (Lnet/minecraft/world/level/ChunkPos;)Ljava/util/concurrent/CompletableFuture; + + +# lod generation from save file +accessible field net/minecraft/server/level/ChunkMap mainThreadExecutor Lnet/minecraft/util/thread/BlockableEventLoop; + + +# grabbing textures +accessible field net/minecraft/client/renderer/texture/TextureAtlasSprite animatedTexture Lnet/minecraft/client/renderer/texture/TextureAtlasSprite$AnimatedTexture; +accessible field net/minecraft/client/renderer/texture/TextureAtlasSprite width I +accessible field net/minecraft/client/renderer/texture/TextureAtlasSprite height I +accessible field net/minecraft/client/renderer/texture/TextureAtlasSprite mainImage [Lcom/mojang/blaze3d/platform/NativeImage; +accessible class net/minecraft/client/renderer/texture/TextureAtlasSprite$AnimatedTexture +accessible method net/minecraft/client/renderer/texture/TextureAtlasSprite$AnimatedTexture getFrameX (I)I +accessible method net/minecraft/client/renderer/texture/TextureAtlasSprite$AnimatedTexture getFrameY (I)I +extendable class com/mojang/math/Matrix4f + +# hacky stuff +accessible field net/minecraft/util/ThreadingDetector lock Ljava/util/concurrent/Semaphore; +mutable field net/minecraft/util/ThreadingDetector lock Ljava/util/concurrent/Semaphore; diff --git a/core b/core index fef487f69..37384d8b8 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit fef487f69877d6574a3e505a8f91d06e1cf5b55a +Subproject commit 37384d8b8b1a1b84b0f1de9126623e5c964f2c60 diff --git a/fabric/build.gradle b/fabric/build.gradle index af4d094ec..2b6187586 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -56,12 +56,12 @@ dependencies { addMod("curse.maven:phosphor-372124:${rootProject.phosphor_version_fabric}", rootProject.enable_phosphor) // Sodium - addMod("curse.maven:sodium-394468:${rootProject.sodium_version}", rootProject.enable_sodium) - if (rootProject.enable_sodium != "0") { - implementation "org.joml:joml:1.10.2" - modImplementation(fabricApi.module("fabric-rendering-data-attachment-v1", rootProject.fabric_api_version)) - modImplementation(fabricApi.module("fabric-rendering-fluids-v1", rootProject.fabric_api_version)) - } + addMod("maven.modrinth:sodium:${rootProject.sodium_version}", rootProject.enable_sodium) +// if (rootProject.enable_sodium != "0") { +// implementation "org.joml:joml:1.10.2" +// modImplementation(fabricApi.module("fabric-rendering-data-attachment-v1", rootProject.fabric_api_version)) +// modImplementation(fabricApi.module("fabric-rendering-fluids-v1", rootProject.fabric_api_version)) +// } // Lithium addMod("maven.modrinth:lithium:${rootProject.lithium_version}", rootProject.enable_lithium) diff --git a/gradle.properties b/gradle.properties index f77029b8c..a5d15b204 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,6 +17,7 @@ mod_issues=https://gitlab.com/jeseibel/minecraft-lod-mod/-/issues toml_version=3.6.5 json_version=1.1.1 manifold_version=2022.1.14 +enabled_platforms=fabric,forge mcVersions=1.16.5,1.17.1,1.18.1,1.18.2,1.19 ##### FOR IDE SUPPORT AND TELL IDE TO USE CERTIAN MC VERSION: SWITCH THIS: