Forge build on 1.20.2 with gradle failing with incorrect checksum for blaze3d?
mave007 opened this issue · 5 comments
Trying to search why forge
was removed on Aug 2 I tried to build it myself, but I'm stuck on how to fix the following:
# git status
git status
On branch 1.20.2
Your branch is up to date with 'origin/1.20.2'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: gradle.properties
# git diff gradle.properties
diff --git a/gradle.properties b/gradle.properties
index 25d70633..2c963d72 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -6,7 +6,7 @@ mixinextras_version=0.2.0-beta.9
mod_id=modernfix
minecraft_version=1.20.2
-enabled_platforms=fabric
+enabled_platforms=fabric,forge
forge_version=1.20.1-47.1.3
# parchment_version=2023.07.09
refined_storage_version=4392788
Then running gradle:
# export JAVA_HOME=/Users/mave007/Library/Application\ Support/minecraft/runtime/java-runtime-gamma/mac-os-arm64/java-runtime-gamma/jre.bundle/Contents/Homeara/Library/Application\ Support/minecraft/runtime/java-runtime-gamma/mac-os-arm64/java-runtime-ga
# ./gradlew forge:build --info
[...]
Exception in thread "main" java.io.IOException: Patch expected com/mojang/blaze3d/pipeline/RenderTarget to have the checksum 151eb55a but it was 2dd5aa4b
at net.minecraftforge.binarypatcher.Patcher.patch(Patcher.java:197)
at net.minecraftforge.binarypatcher.Patcher.process(Patcher.java:149)
at net.minecraftforge.binarypatcher.ConsoleTool.main(ConsoleTool.java:161)
Closing SharedServiceManager(827349426)
Closing Git repo: /Users/mave007/git/ModernFix/.git
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':forge'.
> Failed to setup Minecraft, org.gradle.process.internal.ExecException: Process 'command '/Users/mave007/Library/Application Support/minecraft/runtime/java-runtime-gamma/mac-os-arm64/java-runtime-gamma/jre.bundle/Contents/Home/bin/java'' finished with non-zero exit value 1
oh 48.0.6 opened a new can of worms:
# git diff gradle.properties
diff --git a/gradle.properties b/gradle.properties
index 25d70633..d4a63b78 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -6,8 +6,8 @@ mixinextras_version=0.2.0-beta.9
mod_id=modernfix
minecraft_version=1.20.2
-enabled_platforms=fabric
-forge_version=1.20.1-47.1.3
+enabled_platforms=fabric,forge
+forge_version=1.20.2-48.0.6
# parchment_version=2023.07.09
refined_storage_version=4392788
jei_version=13.1.0.2
...already Installed forge-1.20.2-48.0.6-installer.jar
, then:
> Task :forge:compileJava FAILED
/Users/mave007/Documents/minecraft/ModernFix/forge/src/main/java/org/embeddedt/modernfix/forge/mixin/core/NetworkHooksMixin.java:12: error: Mixin has no targets
@Mixin(NetworkHooks.class)
^
/Users/mave007/Documents/minecraft/ModernFix/forge/src/main/java/org/embeddedt/modernfix/forge/mixin/bugfix/removed_dimensions/LevelStorageSourceMixin.java:10: warning: Unable to locate method mapping for @At(INVOKE.<target>) 'Lcom/mojang/serialization/DataResult;getOrThrow(ZLjava/util/function/Consumer;)Ljava/lang/Object;'
@ModifyArg(method = "*", at = @At(value = "INVOKE", target = "Lcom/mojang/serialization/DataResult;getOrThrow(ZLjava/util/function/Consumer;)Ljava/lang/Object;", ordinal = 0), index = 0)
^
/Users/mave007/Documents/minecraft/ModernFix/forge/src/main/java/org/embeddedt/modernfix/forge/mixin/bugfix/recipe_book_type_desync/RecipeBookSettingsMixin.java:39: warning: Unable to locate method mapping for @At(INVOKE.<target>) 'Lnet/minecraft/network/FriendlyByteBuf;readBoolean()Z'
@Redirect(method = "read(Lnet/minecraft/network/FriendlyByteBuf;)Lnet/minecraft/stats/RecipeBookSettings;", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/FriendlyByteBuf;readBoolean()Z"))
^
/Users/mave007/Documents/minecraft/ModernFix/forge/src/main/java/org/embeddedt/modernfix/forge/mixin/perf/dynamic_resources/ModelBakerImplMixin.java:24: warning: Cannot find target for @Shadow field in net.minecraft.client.resources.model.ModelBakery$ModelBakerImpl
@Shadow @Final private ModelBakery field_40571;
^
/Users/mave007/Documents/minecraft/ModernFix/forge/src/main/java/org/embeddedt/modernfix/forge/init/ModernFixForge.java:22: error: cannot find symbol
import net.minecraftforge.network.NetworkConstants;
^
symbol: class NetworkConstants
location: package net.minecraftforge.network
/Users/mave007/Documents/minecraft/ModernFix/forge/src/main/java/org/embeddedt/modernfix/forge/mixin/core/BootstrapMixin.java:4: error: cannot find symbol
import net.minecraftforge.network.NetworkConstants;
^
symbol: class NetworkConstants
location: package net.minecraftforge.network
/Users/mave007/Documents/minecraft/ModernFix/forge/src/main/java/org/embeddedt/modernfix/forge/mixin/core/NetworkHooksMixin.java:4: error: cannot find symbol
import net.minecraftforge.network.NetworkHooks;
^
symbol: class NetworkHooks
location: package net.minecraftforge.network
/Users/mave007/Documents/minecraft/ModernFix/forge/src/main/java/org/embeddedt/modernfix/forge/packet/PacketHandler.java:4: error: cannot find symbol
import net.minecraftforge.network.NetworkEvent;
^
symbol: class NetworkEvent
location: package net.minecraftforge.network
/Users/mave007/Documents/minecraft/ModernFix/forge/src/main/java/org/embeddedt/modernfix/forge/packet/PacketHandler.java:6: error: package net.minecraftforge.network.simple does not exist
import net.minecraftforge.network.simple.SimpleChannel;
^
/Users/mave007/Documents/minecraft/ModernFix/forge/src/main/java/org/embeddedt/modernfix/forge/packet/PacketHandler.java:17: error: cannot find symbol
public static final SimpleChannel INSTANCE = NetworkRegistry.newSimpleChannel(
^
symbol: class SimpleChannel
location: class PacketHandler
/Users/mave007/Documents/minecraft/ModernFix/forge/src/main/java/org/embeddedt/modernfix/forge/packet/PacketHandler.java:29: error: package NetworkEvent does not exist
private static void handleSyncPacket(EntityIDSyncPacket packet, Supplier<NetworkEvent.Context> contextSupplier) {
^
/Users/mave007/Documents/minecraft/ModernFix/forge/src/main/java/org/embeddedt/modernfix/forge/mixin/core/NetworkHooksMixin.java:12: error: cannot find symbol
@Mixin(NetworkHooks.class)
^
symbol: class NetworkHooks
9 errors
3 warnings
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':forge:compileJava'.
> Compilation failed; see the compiler error output for details.
That's expected - the Forge module hasn't been updated since 1.20.1 and some of the code will require changes to work properly on 1.20.2.
ModernFix hasn't officially been ported to Forge on 1.20.2. The plan is to wait for NeoForge support to be added to Architectury Loom, and then release a NeoForge port.
The issue is probably that you didn't change forge_version
in gradle.properties
to a 1.20.2 version of Forge. I suggest using something fairly old like 48.0.6, as newer versions of Forge don't work on Architectury Loom either.
Thanks! I just noticed the forge version as well and I tried with forge-1.20.2-48.0.37
but that also failed, so I will follow your input on downgrading to 48.0.6
and try again
Thanks to @TonimatasDEV, ModernFix 5.10.0 has been ported to Forge 1.20.2. Note that in 1.20.3 the Forge port will be replaced by NeoForge.