Parcourir la source

Minecraft 1.17 + Java 16

Lortseam il y a 4 ans
Parent
commit
263eaa80f6

+ 5 - 3
build.gradle

@@ -1,10 +1,10 @@
 plugins {
-    id 'fabric-loom' version '0.6-SNAPSHOT'
+    id 'fabric-loom' version '0.8-SNAPSHOT'
     id "io.freefair.lombok" version "5.3.3.3"
 }
 
-sourceCompatibility = JavaVersion.VERSION_1_8
-targetCompatibility = JavaVersion.VERSION_1_8
+sourceCompatibility = JavaVersion.VERSION_16
+targetCompatibility = JavaVersion.VERSION_16
 
 archivesBaseName = project.archives_base_name
 version = project.mod_version
@@ -30,6 +30,8 @@ tasks.withType(JavaCompile).configureEach {
     // this fixes some edge cases with special characters not displaying correctly
     // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
     it.options.encoding = "UTF-8"
+
+    it.options.release = 16
 }
 
 jar {

+ 2 - 2
gradle.properties

@@ -2,8 +2,8 @@ org.gradle.jvmargs=-Xmx1G
 
 # Fabric Properties
 # check these on https://modmuss50.me/fabric.html
-minecraft_version=1.16.5
-yarn_mappings=1.16.5+build.8
+minecraft_version=1.17
+yarn_mappings=1.17+build.1
 loader_version=0.11.3
 
 # Mod Properties

+ 1 - 1
gradle/wrapper/gradle-wrapper.properties

@@ -1 +1 @@
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip

+ 1 - 1
src/main/java/me/lortseam/bettermounthud/mixin/IngameHudMixin.java

@@ -27,7 +27,7 @@ public abstract class IngameHudMixin {
     @Redirect(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;hasJumpingMount()Z"))
     private boolean bettermounthud$switchBar(ClientPlayerEntity player) {
         if (!player.hasJumpingMount()) return false;
-        return client.options.keyJump.isPressed() || player.method_3151() > 0;
+        return client.options.keyJump.isPressed() || player.getMountJumpStrength() > 0;
     }
 
 }

+ 1 - 1
src/main/resources/bettermounthud.mixins.json

@@ -2,7 +2,7 @@
   "required": true,
   "minVersion": "0.8",
   "package": "me.lortseam.bettermounthud.mixin",
-  "compatibilityLevel": "JAVA_8",
+  "compatibilityLevel": "JAVA_16",
   "client": [
     "IngameHudMixin"
   ],

+ 2 - 1
src/main/resources/fabric.mod.json

@@ -21,6 +21,7 @@
     }
   ],
   "depends": {
-    "fabricloader": ">=0.7.4"
+    "java": ">=16",
+    "fabricloader": ">=0.11.3"
   }
 }