Skip to content
This repository was archived by the owner on Oct 26, 2024. It is now read-only.

Commit 98bc92d

Browse files
committed
Update for MC 1.21
1 parent 0858626 commit 98bc92d

File tree

7 files changed

+35
-20
lines changed

7 files changed

+35
-20
lines changed

README.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,16 @@ the intensity of which can be configured and will scale up based on the amount o
1010
If you have updated your PiShock firmware to V3 (beta), you must use version 1.1.2.0 or later of the mod.
1111

1212
## Supported Minecraft/Minecraft Forge versions
13-
* 1.19.x (Minecraft Forge 44.x, 45.x)
14-
* 1.20.x (Minecraft Forge 46.x, 47.x, 48.x, 49.x)
13+
### Fully supported (Use the latest version)
14+
* 1.21 (Minecraft Forge 51.x)
15+
16+
### Deprecated support
17+
* 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))
18+
* 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))
19+
20+
### Untested (might or might not work)
21+
* Minecraft Forge 50.x
22+
* Any **newer** Minecraft or Minecraft Forge version not mentioned
1523

1624
## Needed hardware
1725
* [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
2836
1. Have a working Minecraft and Forge installation. See [How to install Forge](https://www.wikihow.com/Install-Minecraft-Forge) if you're unsure.
2937
* Make sure you've launched the game at least once with Forge installed so the required folder structure is generated.
3038
2. Download the latest release jar from [here](https://github.com/ojaha065/PiShockForMC/releases).
31-
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.
39+
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.
3240
4. Run the game once so a configuration file for the mod gets generated.
3341
5. See the _Mod configuration_ section below. The configuration file can be found inside `config` folder inside Minecraft game directory.
3442
6. Launch the game again. If everything is set correctly, the shocker will vibrate once for one second during the Minecraft startup process.
3543

3644
## Modpacks and compatability with other mods
37-
The mod is licensed under a MIT license, so feel free to include it in any modpack. No permission or attribution is required.
45+
The mod is licensed under a MIT license. Feel free to include it in any modpack, no permission or attribution required.
3846

3947
This mod should be compatible with almost everything.
4048
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
122130
Please take a look in Minecraft logs and search for `pishockmc`.
123131
The actual issue and some helpful advice should be printed there.
124132

125-
### I have some other issue(s) with the mod
133+
### Minecraft fails to start after installing the mod
134+
Double-check your Minecraft and Forge versions and the beginning of this readme
135+
and make sure you're using a compatible version of the mod.
136+
137+
### I'm still having issues
126138
Please open [an issue](https://github.com/ojaha065/PiShockForMC/issues) here on GitHub.
127139

128-
## TODO
140+
## TODO (PRs welcome)
129141
* **Support for multiple shockers**
130142
* I currently only own one, so testing and debugging would be kinda hard.
131143
* In-game configuration GUI

build.gradle

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
plugins {
22
id 'eclipse'
33
id 'idea'
4-
id 'net.minecraftforge.gradle' version '[6.0.16,6.2)'
4+
id 'net.minecraftforge.gradle' version '[6.0.24,6.2)'
55
}
66

7-
version = '1.20-1.1.2.2'
7+
version = '1.21-2.0.0.0'
88
group = 'fi.kissakala'
99
base.archivesName = 'pishockmc'
1010

11-
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
11+
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
1212

1313
minecraft {
14-
mappings channel: 'official', version: '1.20.4'
14+
mappings channel: 'official', version: '1.21'
1515
copyIdeResources = true
16+
reobf = false
1617

1718
runs {
1819
client {
@@ -32,7 +33,10 @@ repositories {
3233
}
3334

3435
dependencies {
35-
minecraft 'net.minecraftforge:forge:1.20.4-49.0.30'
36+
minecraft "net.minecraftforge:forge:1.21-51.0.8"
37+
38+
// 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+
39+
implementation('net.sf.jopt-simple:jopt-simple:5.0.4') { version { strictly '5.0.4' } }
3640
}
3741

3842
jar {
@@ -49,8 +53,6 @@ jar {
4953
}
5054
}
5155

52-
jar.finalizedBy('reobfJar')
53-
5456
tasks.withType(JavaCompile).configureEach {
5557
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
5658
}

gradle/wrapper/gradle-wrapper.jar

-18.2 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
44
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

gradlew

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/META-INF/mods.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
modLoader="javafml"
2-
loaderVersion="[44,)"
2+
loaderVersion="[0,)"
33
license="MIT"
44
issueTrackerURL="https://github.com/ojaha065/PiShockForMC/issues"
55

66
[[mods]]
77
modId="pishockmc"
8-
version="1.20-1.1.2.2"
8+
version="1.21-2.0.0.0"
99
displayName="PiShock for Minecraft"
1010

1111
#updateJSONURL="https://change.me.example.invalid/updates.json" # TODO
@@ -32,12 +32,12 @@ displayTest="IGNORE_ALL_VERSION" # This is a client-only mod
3232
[[dependencies.pishockmc]]
3333
modId="forge"
3434
mandatory=true
35-
versionRange="[44,)"
35+
versionRange="[0,)"
3636
ordering="AFTER"
3737
side="BOTH"
3838
[[dependencies.pishockmc]]
3939
modId="minecraft"
4040
mandatory=true
41-
versionRange="[1.19,1.21)"
41+
versionRange="[1.19,1.22)"
4242
ordering="AFTER"
4343
side="BOTH"

0 commit comments

Comments
 (0)