Source Free SRC Cheat TARGET HUD + Animations (Forge) For Minecraft

CrazyTrap

Newbie
Newbie
Newbie
Newbie
Status
Offline
Joined
Jul 18, 2023
Messages
707
Reaction score
3
Unleash your wildest imagination and expand your Minecraft horizons like never before with our meticulously curated selection of extraordinary resources. These handpicked treasures are specifically designed to elevate your gameplay and bring about unimaginable possibilities. Whether you're a passionate builder, an intrepid explorer, or a daring adventurer, our diverse collection of sources holds something uniquely special for each and every one of you.

Immerse yourself in a realm of endless creativity as you discover cutting-edge mods, awe-inspiring texture packs, and captivating adventure maps that will breathe new life into your Minecraft world. Build majestic cities that touch the sky, craft intricate and breathtaking landscapes, or embark on daring quests that will test your skills and courage. The possibilities are limitless, and the only boundaries are those of your own imagination

i

TARGET HUD + Animations (Forge) gumballoffrecode 1.9:​

JavaScript:
package me.gumballoff.gumballoff.module.modules;

import me.gumballoff.gumballoff.Client;
import me.gumballoff.gumballoff.clickgui.setting.SettingManager;
import me.gumballoff.gumballoff.clickgui.setting.settings.BooleanSetting;
import me.gumballoff.gumballoff.clickgui.setting.settings.NumberSetting;
import me.gumballoff.gumballoff.font.FontUtils;
import me.gumballoff.gumballoff.helpers.AnimationHelper;
import me.gumballoff.gumballoff.module.Module;
import me.gumballoff.gumballoff.module.ModuleInfo;
import me.gumballoff.gumballoff.utils.RenderUtil;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.event.entity.player.AttackEntityEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import org.lwjgl.input.Keyboard;

import java.awt.Color;
import java.util.Objects;

import static me.gumballoff.gumballoff.GUMBALLOFF.mc;

@ModuleInfo(name = "TargetHUD", key = Keyboard.KEY_NONE, category = Module.Category.Visual, description = "Отображает информацию о противнике")
public class TargetHUD extends Module {
    EntityPlayer entity;
    float healthBarWidth;
    BooleanSetting glow = new BooleanSetting("Glow", this, true);
    NumberSetting glowAlpha = new NumberSetting("GlowAlpha", this, 60, 40, 160, 1);
    BooleanSetting glowBar = new BooleanSetting("GlowBar", this, true);
    NumberSetting glowAlphaBar = new NumberSetting("GlowAlphaBar", this, 160, 40, 160, 1);

    public TargetHUD() {
        addSettings(glow, glowAlpha, glowBar, glowAlphaBar);
    }

    @SubscribeEvent
    public void s(AttackEntityEvent e) {
        if (e.getTarget() instanceof EntityPlayer) {
            entity = (EntityPlayer) e.getTarget();
        }
    }

    @SubscribeEvent
    public void onRender(RenderGameOverlayEvent.Text e) {
        int x = Client.dragScreen.xTarget, y = Client.dragScreen.yTarget;

        if (entity != null && entity != mc.player && mc.player.getDistance(entity) < 6 && entity.getHealth() > 0) {
            float hurtPercent = (entity.hurtTime - mc.getRenderPartialTicks()) / 6.f;
            healthBarWidth = AnimationHelper.animation(healthBarWidth, entity.getHealth() / entity.getMaxHealth() * 98, 1);

            RenderUtil.renderBlurredShadow(new java.awt.Color(0, 0, 0, 255), x - 4, y - 4, 146, 44, 5);
            FontUtils.normal.drawStringWithShadow(entity.getName(), x + 40, y + 8, -1);
            RenderUtil.drawSmoothGradientHRect(x + 40, y + 24, x + 40 + healthBarWidth, y + 34, -1, Hud.client());
            if (glowBar.getBoolValue()) {
                RenderUtil.renderBlurredShadow(new Color((int) SettingManager.getSettingByName("Color", "Red").getNumberValue(), (int) SettingManager.getSettingByName("Color", "Green").getNumberValue(), (int) SettingManager.getSettingByName("Color", "Blue").getNumberValue(), (int) glowAlphaBar.getNumberValue()), x + 40 - 4, y + 24 - 4, healthBarWidth + 8, 10 + 8, 10);
            }
            if (healthBarWidth > 30) {
                FontUtils.normal.drawStringWithShadow(String.format("%.1f", (entity.getHealth() / entity.getMaxHealth()) * 100) + '%', x + 40 - 2 + healthBarWidth - FontUtils.normal.getStringWidth(String.format("%.1f", (entity.getHealth() / entity.getMaxHealth()) * 100) + '%'), y + 27, -1);
            } else {
                FontUtils.normal.drawStringWithShadow(String.format("%.1f", (entity.getHealth() / entity.getMaxHealth()) * 100) + '%', x + 40 + 2, y + 27, -1);
            }
            GlStateManager.color(1F, 1F - hurtPercent, 1F - hurtPercent);
            try {
                drawHead(Objects.requireNonNull(mc.getConnection()).getPlayerInfo(entity.getUniqueID()).getLocationSkin(), x, y);
            } catch (Exception ignored) {
            }
            if (glow.getBoolValue()) {
                RenderUtil.renderBlurredShadow(new java.awt.Color((int) SettingManager.getSettingByName("Color", "Red").getNumberValue(), (int) SettingManager.getSettingByName("Color", "Green").getNumberValue(), (int) SettingManager.getSettingByName("Color", "Blue").getNumberValue(), (int) glowAlpha.getNumberValue()), x - 4, y - 4, 146, 44, 5);
            }
        }
    }

    public void drawHead(ResourceLocation skin, int width, int height) {
        mc.getTextureManager().bindTexture(skin);
        Gui.drawScaledCustomSizeModalRect(width, height, 8, 8, 8, 8, 38, 36, 64, 64);
    }

    public static void drawFadeString(final String s, float x, float y) {
        float updateX = x;

        for (int i = 0; i < s.length(); i++) {
            String str = String.valueOf(s.charAt(i));

            double colorOffset = (Math.abs(((System.currentTimeMillis()) / 20D)) / 50) + (50 / (FontUtils.normal.getHeight() + i * 14f + 50D));
            java.awt.Color color = getGradientOffset1(new java.awt.Color(0xFFFFFF), new java.awt.Color((int) SettingManager.getSettingByName("Color", "Red").getNumberValue(), (int) SettingManager.getSettingByName("Color", "Green").getNumberValue(), (int) SettingManager.getSettingByName("Color", "Blue").getNumberValue()), colorOffset, 160);

            FontUtils.normal.drawStringWithShadow(str, (int) updateX, (int) y, color.hashCode());
            updateX += FontUtils.normal.getStringWidth(str);
        }
    }

    public static java.awt.Color getGradientOffset1(final java.awt.Color color1, final java.awt.Color color2, double offset, final int alpha) {
        if (offset > 1) {
            double left = offset % 1;
            int off = (int) offset;
            offset = off % 2 == 0 ? left : 1 - left;

        }
        final double inverse_percent = 1 - offset;
        final int redPart = (int) (color1.getRed() * inverse_percent + color2.getRed() * offset);
        final int greenPart = (int) (color1.getGreen() * inverse_percent + color2.getGreen() * offset);
        final int bluePart = (int) (color1.getBlue() * inverse_percent + color2.getBlue() * offset);
        return new java.awt.Color(redPart, greenPart, bluePart, alpha);
    }
}
 
Top