From d36b05dce7ef63f7b49cf2af3d1eded887a451e0 Mon Sep 17 00:00:00 2001 From: yurisuika Date: Wed, 2 Mar 2022 05:39:10 -0800 Subject: [PATCH] Removed FAPI Dependency Updated to 1.18.2 Removed Fabric API dependency Support for DetailArmorBar --- build.gradle | 5 ++--- gradle.properties | 10 +++++----- src/main/java/com/yurisuika/raised/Raised.java | 17 ----------------- .../detailarmorbar/ArmorBarRendererMixin.java | 17 +++++++++++++++++ src/main/resources/fabric.mod.json | 10 +++------- src/main/resources/raised.mixins.json | 3 ++- 6 files changed, 29 insertions(+), 33 deletions(-) delete mode 100644 src/main/java/com/yurisuika/raised/Raised.java create mode 100644 src/main/java/com/yurisuika/raised/mixin/mods/detailarmorbar/ArmorBarRendererMixin.java diff --git a/build.gradle b/build.gradle index 1c083548..51768f70 100644 --- a/build.gradle +++ b/build.gradle @@ -20,10 +20,9 @@ dependencies { mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" - modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - - modCompileOnly ("squeek.appleskin:appleskin-fabric:mc1.18-2.2.0") {transitive = false} + modCompileOnly ("squeek.appleskin:appleskin-fabric:mc1.18.1-2.3.0") {transitive = false} modCompileOnly ("com.github.Lizard-Of-Oz.Inventorio:inventorio-1.18-fabric:1.18-SNAPSHOT") {transitive = false} + modCompileOnly ("com.github.RedLime:DetailArmorBar:2.6.1") {transitive = false} } processResources { diff --git a/gradle.properties b/gradle.properties index 35fe3bb1..30bf1c88 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,15 +3,15 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use - minecraft_version=1.18.1 - yarn_mappings=1.18.1+build.22 - loader_version=0.12.12 + minecraft_version=1.18.2 + yarn_mappings=1.18.2+build.1 + loader_version=0.13.3 # Mod Properties - mod_version = 1.0.2 + mod_version = 1.0.3 maven_group = com.yurisuika.raised archives_base_name = raised # Dependencies # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api - fabric_version=0.46.4+1.18 + fabric_version=0.47.8+1.18.2 diff --git a/src/main/java/com/yurisuika/raised/Raised.java b/src/main/java/com/yurisuika/raised/Raised.java deleted file mode 100644 index 20dfd74a..00000000 --- a/src/main/java/com/yurisuika/raised/Raised.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.yurisuika.raised; - -import net.fabricmc.api.ModInitializer; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -public class Raised implements ModInitializer { - - public static final Logger LOGGER = LogManager.getLogger("modid"); - - @Override - public void onInitialize() { - - LOGGER.info("Loading Raised!"); - - } -} diff --git a/src/main/java/com/yurisuika/raised/mixin/mods/detailarmorbar/ArmorBarRendererMixin.java b/src/main/java/com/yurisuika/raised/mixin/mods/detailarmorbar/ArmorBarRendererMixin.java new file mode 100644 index 00000000..844efda3 --- /dev/null +++ b/src/main/java/com/yurisuika/raised/mixin/mods/detailarmorbar/ArmorBarRendererMixin.java @@ -0,0 +1,17 @@ +package com.yurisuika.raised.mixin.mods.detailarmorbar; + +import com.redlimerl.detailab.render.ArmorBarRenderer; +import net.minecraft.client.util.Window; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Redirect; + +@Mixin(ArmorBarRenderer.class) +public class ArmorBarRendererMixin { + + @Redirect(method = "render", at = @At(value = "INVOKE", target = "net/minecraft/client/util/Window.getScaledHeight()I")) + private int modifyAddonsScaledHeight(Window instance) { + return instance.getScaledHeight() - 1; + } + +} diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 9da41d1f..9b0a9793 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -10,16 +10,16 @@ ], "contact": { "homepage": "https://suikacraft.com", - "sources": "https://github.com/yurisuika/Raised" + "sources": "https://github.com/yurisuika/Raised", + "issues": "https://github.com/yurisuika/Raised/issues" }, "license": "GNU General Public License 3.0", "icon": "assets/raised/icon.png", - "environment": "*", + "environment": "client", "entrypoints": { "main": [ - "com.yurisuika.raised.Raised" ] }, "mixins": [ @@ -30,11 +30,7 @@ "depends": { "fabricloader": ">=0.11.6", - "fabric": "*", "minecraft": "1.18.x", "java": ">=17" - }, - "suggests": { - "another-mod": "*" } } diff --git a/src/main/resources/raised.mixins.json b/src/main/resources/raised.mixins.json index eb637a18..e29c0362 100644 --- a/src/main/resources/raised.mixins.json +++ b/src/main/resources/raised.mixins.json @@ -2,12 +2,13 @@ "required": true, "minVersion": "0.8", "package": "com.yurisuika.raised.mixin", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ ], "client": [ "client.gui.hud.InGameHudMixin", "mods.appleskin.HUDOverlayHandlerMixin", + "mods.detailarmorbar.ArmorBarRendererMixin", "mods.inventorio.HotbarHUDRendererMixin" ], "injectors": {