This commit is contained in:
kirillsaint 2023-10-28 21:07:33 +06:00
parent f511e8ff28
commit dec8280da7
2 changed files with 13 additions and 2 deletions

View File

@ -12,9 +12,9 @@ import net.silentclient.client.Client;
import net.silentclient.client.event.impl.EventRenderDamageTint;
import net.silentclient.client.event.impl.RenderEvent;
import net.silentclient.client.gui.lite.clickgui.utils.GlUtils;
import net.silentclient.client.gui.notification.NotificationManager;
import net.silentclient.client.mods.hud.BossBarMod;
import net.silentclient.client.mods.hud.ScoreboardMod;
import net.silentclient.client.mods.render.AnimationsMod;
import net.silentclient.client.mods.render.CrosshairMod;
import net.silentclient.client.mods.render.PackTweaksMod;
import net.silentclient.client.mods.render.TitlesMod;
@ -25,13 +25,23 @@ import org.lwjgl.opengl.GL11;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.*;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(GuiIngame.class)
public abstract class GuiInGameMixin extends Gui {
@Shadow @Final private Minecraft mc;
@Redirect(method = "renderPlayerStats", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiIngame;drawTexturedModalRect(IIIIII)V", ordinal = 4))
public void oldHealth(GuiIngame instance, int i1, int i2, int i3, int i4, int i5, int i6) {
if(!Client.getInstance().getModInstances().getOldAnimationsMod().isEnabled() || !Client.getInstance().getSettingsManager().getSettingByClass(AnimationsMod.class, "1.7 Health Animation").getValBoolean()) {
instance.drawTexturedModalRect(i1, i2, i3, i4, i5, i6);
}
}
@Inject(method = "renderGameOverlay", at = @At("RETURN"))
public void renderEvent(float partialTicks, CallbackInfo ci) {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);

View File

@ -16,6 +16,7 @@ public class AnimationsMod extends Mod {
this.addBooleanSetting("1.7 Block Animation", this, true);
this.addBooleanSetting("1.7 Rod Position", this, true);
this.addBooleanSetting("1.7 Punching Animation", this, true);
this.addBooleanSetting("1.7 Health Animation", this, true);
this.addBooleanSetting("1.7 Eating & Drinking Animation", this, true);
this.addBooleanSetting("1.7 Block-Hitting Animation", this, true);
this.addBooleanSetting("1.7 Item Switching Animation", this, true);