Skip to content

Commit

Permalink
Update to Minecraft 1.21 (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dqlsu authored Jun 17, 2024
1 parent f41bf85 commit eec0bf4
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 27 deletions.
18 changes: 9 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id("fabric-loom") version "1.6-SNAPSHOT"
id("com.matthewprenger.cursegradle") version "1.4.0"
id("com.modrinth.minotaur") version "2.4.4"
id("com.modrinth.minotaur") version "2.8.7"
}

group = "me.ramidzkh"
Expand All @@ -28,13 +28,13 @@ repositories {
}

dependencies {
minecraft("net.minecraft:minecraft:1.20.5")
mappings("net.fabricmc:yarn:1.20.5+build.1")
modImplementation("net.fabricmc:fabric-loader:0.15.10")
minecraft("net.minecraft:minecraft:1.21")
mappings("net.fabricmc:yarn:1.21+build.2")
modImplementation("net.fabricmc:fabric-loader:0.15.11")

modImplementation("net.fabricmc.fabric-api:fabric-api:0.97.5+1.20.5")
modImplementation("com.terraformersmc:modmenu:10.0.0-beta.1")
modImplementation("me.shedaniel.cloth:cloth-config-fabric:14.0.126")
modImplementation("net.fabricmc.fabric-api:fabric-api:0.100.1+1.21")
modImplementation("com.terraformersmc:modmenu:11.0.0-rc.4")
modImplementation("me.shedaniel.cloth:cloth-config-fabric:15.0.127")
}

java {
Expand Down Expand Up @@ -76,7 +76,7 @@ System.getenv("CURSEFORGE")?.with { String key ->
releaseType = "release"
}

addGameVersion("1.20.6")
addGameVersion("1.21")
addGameVersion("Fabric")

mainArtifact(remapJar) {
Expand Down Expand Up @@ -109,7 +109,7 @@ modrinth {
}

uploadFile.set(remapJar)
gameVersions.addAll(["1.20.6"])
gameVersions.addAll(["1.21"])

dependencies {
required.project("fabric-api")
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
@Mixin(MinecraftClient.class)
public class MinecraftClientMixin {

@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/GameRenderer;render(FJZ)V"))
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/GameRenderer;render(Lnet/minecraft/client/render/RenderTickCounter;Z)V"))
private void preRender(CallbackInfo callbackInfo) {
Fabrishot.onRenderPreOrPost();
}

@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/GameRenderer;render(FJZ)V", shift = At.Shift.AFTER))
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/GameRenderer;render(Lnet/minecraft/client/render/RenderTickCounter;Z)V", shift = At.Shift.AFTER))
private void postRender(CallbackInfo callbackInfo) {
Fabrishot.onRenderPreOrPost();
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
"name": "Fabrishot",
"description": "Take high resolution screenshots because why not",
"depends": {
"minecraft": "1.20.6",
"minecraft": "1.21",
"fabric-lifecycle-events-v1": "*",
"fabric-key-binding-api-v1": "*"
},
"recommends": {
"fabric-resource-loader-v0": "*",
"modmenu": ">=10.0.0-beta.1",
"cloth-config2": ">=14.0.126"
"modmenu": ">=11.0.0-rc.4",
"cloth-config2": ">=15.0.127"
},
"authors": [
"ramidzkh"
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mixins.fabrishot.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"required": true,
"minVersion": "0.8",
"package": "me.ramidzkh.fabrishot.mixins",
"compatibilityLevel": "JAVA_16",
"compatibilityLevel": "JAVA_21",
"mixins": [
"KeyboardMixin",
"MinecraftClientMixin",
Expand Down

0 comments on commit eec0bf4

Please sign in to comment.