I'm trying to get into Minecraft Forge modding but I don't know why this error keeps appearing.

I’m currently following Forge Modding Tutorial - Minecraft 1.20: Workspace Setup by Modding by Kaupenjoe in Youtube.

I first tried it in VSC, but I switched to the latest version of IntelliJ and Termurin (OpenJDK21U-jdk_x64_windows_hotspot_21.0.8_9).

I’m using forge-1.21.8-58.0.6-mdk instead of 1.20.X like the video though, and my SDK is 21 not 17. Tried downgrading to 17 in both Settings and Project config, but nothing, same error

My java version is:

java 18.0.2.1 2022-08-18

Java(TM) SE Runtime Environment (build 18.0.2.1+1-1)

Java HotSpot(TM) 64-Bit Server VM (build 18.0.2.1+1-1, mixed mode, sharing)

Whenever I try to build the project as the video does, it gives an error and it fails in:

C:\Users\W10\.gradle\wrapper\dists\gradle-8.12.1-bin\eumc4uhoysa37zql93vfjkxy0\gradle-8.12.1-bin.zip
When I was in VSC it told me exactly:

zip END header not found and Your Gradle distribution may have been tampered with. Confirm that the 'distributionSha256Sum' property in your gradle-wrapper.properties file is correct and you are downloading the wrapper from a trusted source.

but when I saw the checksum it had the same number as the one it needed to be.

I’ve tried so far:

  • Deleting the full wrapper, cache and daemon folders in the .gradle
  • Reestarting the IDE and PC
  • Tried downloading directly but it says “The site was not reachable” when like 90% of the download is done.
  • Tried downloading directly but it says “The site was not reachable” when like 90% of the download is done.

Sounds like that might be your issue.
It partly downloads it and then fails.
That also matches that the zip END header was not found and that the checksum does not match.
So you need to find out why your download is not working.
Maybe you have some Firewall or AntiVirus that intervenes the download or something like that.

I think it was internet connection yes! I tried 3 hours after I stopped and it downloaded!

The thing is, I don’t think it’s installed correctly. I have gradle 8 I think and it tells me it “Cannot resolve symbol ‘SubscribeEvent’” when I import it and everywhere I’ve seen it it says it’s a me problem right?

Probably, and not a Gradle problem.
SubscribeEvent is nothing Gradle knows about.