diff --git a/README.md b/README.md index 5a2da6d..640591f 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,16 @@ the intensity of which can be configured and will scale up based on the amount o If you have updated your PiShock firmware to V3 (beta), you must use version 1.1.2.0 or later of the mod. ## Supported Minecraft/Minecraft Forge versions -* 1.19.x (Minecraft Forge 44.x, 45.x) -* 1.20.x (Minecraft Forge 46.x, 47.x, 48.x, 49.x) +### Fully supported (Use the latest version) +* 1.21 (Minecraft Forge 51.x) + +### Deprecated support +* 1.19.x (Minecraft Forge 44.x, 45.x) (Use version [1.1.2.1](https://github.com/ojaha065/PiShockForMC/releases/download/1.20-1.1.2.1/pishockmc-1.20-1.1.2.1.jar)) +* 1.20.x (Minecraft Forge 46.x, 47.x, 48.x, 49.x) (Use version [1.1.2.1](https://github.com/ojaha065/PiShockForMC/releases/download/1.20-1.1.2.1/pishockmc-1.20-1.1.2.1.jar)) + +### Untested (might or might not work) +* Minecraft Forge 50.x +* Any **newer** Minecraft or Minecraft Forge version not mentioned ## Needed hardware * [A PiShock](https://pishock.com) device @@ -28,13 +36,13 @@ If you have updated your PiShock firmware to V3 (beta), you must use version 1.1 1. Have a working Minecraft and Forge installation. See [How to install Forge](https://www.wikihow.com/Install-Minecraft-Forge) if you're unsure. * Make sure you've launched the game at least once with Forge installed so the required folder structure is generated. 2. Download the latest release jar from [here](https://github.com/ojaha065/PiShockForMC/releases). -3. Drop the downloaded .jar file into `mods` folder inside Minecraft game directory. See [Where are Minecraft files stored?](https://help.minecraft.net/hc/en-us/articles/4409159214605-Managing-Data-and-Game-Storage-in-Minecraft-Java-Edition-) if you're unsure how to find the correct game directory. +3. Drop the downloaded .jar file into `mods` folder inside Minecraft game directory. See [Mojang documentation](https://help.minecraft.net/hc/en-us/articles/4409159214605) if you're unsure how to find the correct game directory. 4. Run the game once so a configuration file for the mod gets generated. 5. See the _Mod configuration_ section below. The configuration file can be found inside `config` folder inside Minecraft game directory. 6. Launch the game again. If everything is set correctly, the shocker will vibrate once for one second during the Minecraft startup process. ## Modpacks and compatability with other mods -The mod is licensed under a MIT license, so feel free to include it in any modpack. No permission or attribution is required. +The mod is licensed under a MIT license. Feel free to include it in any modpack, no permission or attribution required. This mod should be compatible with almost everything. If you're using other mods that alter the player health (e.g., changes the maxium health), @@ -122,10 +130,14 @@ This usually means that the provided share code has too restrictive limitations Please take a look in Minecraft logs and search for `pishockmc`. The actual issue and some helpful advice should be printed there. -### I have some other issue(s) with the mod +### Minecraft fails to start after installing the mod +Double-check your Minecraft and Forge versions and the beginning of this readme +and make sure you're using a compatible version of the mod. + +### I'm still having issues Please open [an issue](https://github.com/ojaha065/PiShockForMC/issues) here on GitHub. -## TODO +## TODO (PRs welcome) * **Support for multiple shockers** * I currently only own one, so testing and debugging would be kinda hard. * In-game configuration GUI diff --git a/build.gradle b/build.gradle index 4eb0d67..c522deb 100644 --- a/build.gradle +++ b/build.gradle @@ -1,18 +1,19 @@ plugins { id 'eclipse' id 'idea' - id 'net.minecraftforge.gradle' version '[6.0.16,6.2)' + id 'net.minecraftforge.gradle' version '[6.0.24,6.2)' } -version = '1.20-1.1.2.2' +version = '1.21-2.0.0.0' group = 'fi.kissakala' base.archivesName = 'pishockmc' -java.toolchain.languageVersion = JavaLanguageVersion.of(17) +java.toolchain.languageVersion = JavaLanguageVersion.of(21) minecraft { - mappings channel: 'official', version: '1.20.4' + mappings channel: 'official', version: '1.21' copyIdeResources = true + reobf = false runs { client { @@ -32,7 +33,10 @@ repositories { } dependencies { - minecraft 'net.minecraftforge:forge:1.20.4-49.0.30' + minecraft "net.minecraftforge:forge:1.21-51.0.8" + + // Hack fix for now, force jopt-simple to be exactly 5.0.4 because Mojang ships that version, but some transitive dependencies request 6.0+ + implementation('net.sf.jopt-simple:jopt-simple:5.0.4') { version { strictly '5.0.4' } } } jar { @@ -49,8 +53,6 @@ jar { } } -jar.finalizedBy('reobfJar') - tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index c1962a7..e644113 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 309b4e1..b82aa23 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 97de990..1aa94a4 100644 --- a/gradlew +++ b/gradlew @@ -200,7 +200,7 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"' +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command: # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, diff --git a/gradlew.bat b/gradlew.bat index 16e26a1..25da30d 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -34,7 +34,7 @@ set APP_HOME=%DIRNAME% for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m" +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 73d0850..af58050 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -1,11 +1,11 @@ modLoader="javafml" -loaderVersion="[44,)" +loaderVersion="[0,)" license="MIT" issueTrackerURL="https://github.com/ojaha065/PiShockForMC/issues" [[mods]] modId="pishockmc" -version="1.20-1.1.2.2" +version="1.21-2.0.0.0" displayName="PiShock for Minecraft" #updateJSONURL="https://change.me.example.invalid/updates.json" # TODO @@ -32,12 +32,12 @@ displayTest="IGNORE_ALL_VERSION" # This is a client-only mod [[dependencies.pishockmc]] modId="forge" mandatory=true - versionRange="[44,)" + versionRange="[0,)" ordering="AFTER" side="BOTH" [[dependencies.pishockmc]] modId="minecraft" mandatory=true - versionRange="[1.19,1.21)" + versionRange="[1.19,1.22)" ordering="AFTER" side="BOTH" \ No newline at end of file