Skip to content

Commit

Permalink
Health Overlay support
Browse files Browse the repository at this point in the history
  • Loading branch information
yurisuika committed Apr 18, 2022
1 parent 16d3851 commit f70476c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ group = project.maven_group
repositories {
maven { url "https://maven.ryanliptak.com/" }
maven { url "https://jitpack.io" }
maven { url "https://cursemaven.com" }
}

dependencies {
Expand All @@ -23,6 +24,7 @@ dependencies {
modCompileOnly ("squeek.appleskin:appleskin-fabric:mc1.18.2-2.4.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}
modCompileOnly ("curse.maven:health-overlay-fabric-313219:3563686") {transitive = false}
}

processResources {
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.2
yarn_mappings=1.18.2+build.3
loader_version=0.13.3

# Mod Properties
mod_version = 1.0.6
mod_version = 1.0.7
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.48.0+1.18.2
fabric_version=0.51.0+1.18.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.yurisuika.raised.mixin.mods;

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;
import terrails.healthoverlay.render.HeartRenderer;

@Mixin(HeartRenderer.class)
public class HealthOverlayMixin {

@Redirect(method = "renderPlayerHearts", at = @At(value = "INVOKE", target = "net/minecraft/client/util/Window.getScaledHeight()I"))
private int modifyAddonsScaledHeight(Window instance) {
return instance.getScaledHeight() - 2;
}

}
1 change: 1 addition & 0 deletions src/main/resources/raised.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"client.gui.hud.InGameHudMixin",
"mods.AppleskinMixin",
"mods.DetailArmorBarMixin",
"mods.HealthOverlayMixin",
"mods.InventorioMixin"
],
"injectors": {
Expand Down

0 comments on commit f70476c

Please sign in to comment.