BossBar Mod

This commit is contained in:
kirillsaint 2023-06-30 16:47:35 +06:00
parent e74b01de24
commit c29bf80044

View File

@ -5,10 +5,12 @@ import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.silentclient.client.event.impl.EventRenderDamageTint; import net.silentclient.client.event.impl.EventRenderDamageTint;
import net.silentclient.client.event.impl.RenderEvent; import net.silentclient.client.event.impl.RenderEvent;
import net.silentclient.client.mods.hud.BossBarMod;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(GuiIngame.class) @Mixin(GuiIngame.class)
@ -28,4 +30,9 @@ public abstract class GuiInGameMixin {
public void tintRenderEvent(ScaledResolution sr, float partialTicks, CallbackInfo ci) { public void tintRenderEvent(ScaledResolution sr, float partialTicks, CallbackInfo ci) {
new EventRenderDamageTint().call(); new EventRenderDamageTint().call();
} }
@Redirect(method = "renderGameOverlay", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiIngame;renderBossHealth()V"))
public void customBossBar(GuiIngame instance) {
BossBarMod.renderBossHealth(instance);
}
} }