diff --git a/Readme.md b/Readme.md index 326b4e168..4b790129d 100644 --- a/Readme.md +++ b/Readme.md @@ -23,6 +23,7 @@ This branch is for these versions of Minecraft - 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 @@ -97,7 +98,7 @@ This branch support 5 built versions: - 1.18.2 - 1.18.1 (which also runs on 1.18) - 1.17.1 (which also runs on 1.17) - - 1.16.5 (which also runs 1.16.5) + - 1.16.5 (which also runs 1.16.4) To switch between active versions, change `mcVer=1.?` in `gradle.properties` file. @@ -115,7 +116,7 @@ If running on IDE, to ensure IDE pickup the changed versions, you will need to r 6. The compiled jar file will be in the folder `Merged` **If in terminal:** -1. `git clone --recurse-submodules https://gitlab.com/jeseibel/minecraft-lod-mod.git` +1. `git clone -b 1.6.4a_dev --recurse-submodules https://gitlab.com/jeseibel/minecraft-lod-mod.git` 2. `cd minecraft-lod-mod` 3. `./gradlew assemble` 4. `./gradlew mergeJars` diff --git a/core b/core index 9670cbbb7..c3bb079b4 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 9670cbbb74ae2c5114f74466ac7c7db4f290a856 +Subproject commit c3bb079b425ac655eb5ec2c5a6983e05a37ee50f diff --git a/fabric/src/main/java/com/seibel/lod/fabric/mixins/MixinDebugScreenOverlay.java b/fabric/src/main/java/com/seibel/lod/fabric/mixins/MixinDebugScreenOverlay.java new file mode 100644 index 000000000..f591f01cd --- /dev/null +++ b/fabric/src/main/java/com/seibel/lod/fabric/mixins/MixinDebugScreenOverlay.java @@ -0,0 +1,24 @@ +package com.seibel.lod.fabric.mixins; + +import com.seibel.lod.core.render.F3Screen; +import net.minecraft.client.gui.components.DebugScreenOverlay; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +import java.util.List; + +@Mixin(DebugScreenOverlay.class) +public class MixinDebugScreenOverlay { + + @Inject(method = "getSystemInformation", at = @At("RETURN")) + private void addCustomF3(CallbackInfoReturnable> cir) { + List messages = cir.getReturnValue(); + + for (String i: F3Screen.f3List) { + messages.add(i); + } + } + +} diff --git a/fabric/src/main/resources/fabric.lod.mixins.json b/fabric/src/main/resources/fabric.lod.mixins.json index 6cfe56a60..16d0e8d7c 100644 --- a/fabric/src/main/resources/fabric.lod.mixins.json +++ b/fabric/src/main/resources/fabric.lod.mixins.json @@ -13,6 +13,7 @@ "MixinWorldRenderer", "MixinFogRenderer", "MixinChunkGenerator", + "MixinDebugScreenOverlay", "events.MixinClientLevel", "events.MixinMinecraft", "events.MixinBlockUpdate", diff --git a/forge/src/main/java/com/seibel/lod/forge/mixins/MixinDebugScreenOverlay.java b/forge/src/main/java/com/seibel/lod/forge/mixins/MixinDebugScreenOverlay.java new file mode 100644 index 000000000..8f88926aa --- /dev/null +++ b/forge/src/main/java/com/seibel/lod/forge/mixins/MixinDebugScreenOverlay.java @@ -0,0 +1,24 @@ +package com.seibel.lod.forge.mixins; + +import com.seibel.lod.core.render.F3Screen; +import net.minecraft.client.gui.components.DebugScreenOverlay; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +import java.util.List; + +@Mixin(DebugScreenOverlay.class) +public class MixinDebugScreenOverlay { + + @Inject(method = "getSystemInformation", at = @At("RETURN")) + private void addCustomF3(CallbackInfoReturnable> cir) { + List messages = cir.getReturnValue(); + + for (String i: F3Screen.f3List) { + messages.add(i); + } + } + +} diff --git a/forge/src/main/resources/lod.mixins.json b/forge/src/main/resources/lod.mixins.json index 589806557..56fb0e53c 100644 --- a/forge/src/main/resources/lod.mixins.json +++ b/forge/src/main/resources/lod.mixins.json @@ -11,7 +11,8 @@ "MixinFogRenderer", "MixinChunkGenerator", "MixinLightmap", - "MixinTFChunkGenerator" + "MixinTFChunkGenerator", + "MixinDebugScreenOverlay" ], "server": [] }