From c20dfae994f73bdbaffbee412d3564fa531559ee Mon Sep 17 00:00:00 2001 From: Sibghatullah Mujaddid Date: Thu, 25 Jun 2020 14:54:06 +0800 Subject: [PATCH] Build for Minecraft 1.16.1 --- build.gradle | 18 +++++++++--------- gradle.properties | 12 ++++++------ .../net/pancham138/horseinfo/HorseInfo.java | 4 ++-- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/build.gradle b/build.gradle index 772f0f8..81cee94 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '0.2.7-SNAPSHOT' + id 'fabric-loom' version '0.4.29' id 'maven-publish' id "com.wynprice.cursemaven" version "2.1.4" } @@ -8,17 +8,17 @@ sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 archivesBaseName = project.archives_base_name -version = project.mod_version +version = "${project.mod_version}-${minecraft_version}" group = project.maven_group minecraft { } repositories { - // maven { - // name = 'TehNut temporary maven' - // url = 'https://github.com/TehNut/temporary-maven-thing/tree/master/maven' - // } + maven { + name = 'TehNut' + url = 'https://maven.tehnut.info' + } maven { url = "https://minecraft.curseforge.com/api/maven" } } @@ -30,9 +30,9 @@ dependencies { modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" - // modImplementation "mcp.mobius.waila:Hwyla:${project.hwyla_version}" - modCompile "curse.maven:hwyla:2931299" - modCompile "curse.maven:hwyla:2931303" + modImplementation "mcp.mobius.waila:Hwyla:${project.hwyla_version}" + // modCompile "curse.maven:hwyla:2987120" + // modCompile "curse.maven:hwyla:2987122" } processResources { diff --git a/gradle.properties b/gradle.properties index 1f74d7b..5848b42 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,15 +1,15 @@ org.gradle.jvmargs = -Xmx1G #Fabric properties -minecraft_version = 1.15.2 -yarn_mappings = 1.15.2+build.15 -loader_version = 0.8.4+build.198 +minecraft_version = 1.16.1 +yarn_mappings = 1.16.1+build.4 +loader_version = 0.8.8+build.202 #Mod properties -mod_version = 0.1.0 +mod_version = 0.2.0 maven_group = net.pancham138.horseinfo archives_base_name = hwyla-addon-horseinfo #Dependencies -fabric_api_version = 0.11.1+build.312-1.15 -hwyla_version = 1.15.2-1.9.22-73 \ No newline at end of file +fabric_api_version = 0.13.1+build.370-1.16 +hwyla_version = 1.16-1.9.22-74 \ No newline at end of file diff --git a/src/main/java/net/pancham138/horseinfo/HorseInfo.java b/src/main/java/net/pancham138/horseinfo/HorseInfo.java index 1e3a5ce..5bca09a 100644 --- a/src/main/java/net/pancham138/horseinfo/HorseInfo.java +++ b/src/main/java/net/pancham138/horseinfo/HorseInfo.java @@ -66,7 +66,7 @@ else if (jumpHeight > 4.0f) addText(tooltip, "tooltip.horseinfo.jump", FORMAT.format(jumpHeight), colorJump); - final double speed = horse.getAttributeInstance(EntityAttributes.MOVEMENT_SPEED).getBaseValue() * 42.157787584f; + final double speed = horse.getAttributeInstance(EntityAttributes.GENERIC_MOVEMENT_SPEED).getBaseValue() * 42.157787584f; Formatting colorSpeed; if (speed < 7.0f) @@ -87,7 +87,7 @@ public static void addText(List tooltip, String key, String value, Formatt public static Text getText(String key, String value, Formatting color) { Text text = new TranslatableText(key, value); - text.getStyle().setColor(color); + text.getStyle().withColor(color); return text; }