Исходник Сливаю свою вт и радар

Начинающий
Статус
Оффлайн
Регистрация
17 Апр 2023
Сообщения
181
Реакции[?]
2
Поинты[?]
0
ну типа да

ss:
1687546932978.png
1687547051454.png

wt:
                    DragWaterMark dwm = (DragWaterMark) Smertnix.instance.draggableHUD.getDraggableComponentByClass(DragWaterMark.class);
                    dwm.setWidth(134);
                    dwm.setHeight(15);
                    int y = dwm.getY();
                    Color onecolor = new Color(oneColor.getColorValue());
                    Color twocolor = new Color(ModuleList.twoColor.getColorValue());
                    Color a1 = new Color(101, 0, 255);
                    Color a2 = new Color(3, 24, 250);
                    Color a3 = new Color(0, 255, 196);
                    Color a4 = new Color(223, 17, 255);
                    Color g1 = ColorUtils2.interpolateColorsBackAndForth(15, 270, a4, a1);
                    Color gg2 = ColorUtils2.interpolateColorsBackAndForth(15, 270, a3, a2);
                    Color gg3 = ColorUtils2.interpolateColorsBackAndForth(15, 270, g1, gg2);
                    if (ModuleList.colorList.currentMode.equals("Rainbow")) {
                        gradientColor1 = ColorUtils.rainbowCol(15, 0, 1, 5);
                        gradientColor2 = ColorUtils.rainbowCol(15, 90, 1, 5);
                        gradientColor3 = ColorUtils.rainbowCol(15, 180, 1, 5);
                        gradientColor4 = ColorUtils.rainbowCol(15, 270, 1, 5);
                    } else if (ModuleList.colorList.currentMode.equals("Custom")) {
                        gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(15, 0, onecolor, twocolor);
                        gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(15, 90, onecolor, twocolor);
                        gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(15, 180, onecolor, twocolor);
                        gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(15, 270, onecolor, twocolor);
                    } else if (ModuleList.colorList.currentMode.equals("Astolfo")) {
                        gradientColor1 = astolfo(15, 0, 1F, 3f);
                        gradientColor2 = astolfo(15, 90, 1F, 3f);
                        gradientColor3 = astolfo(15, 180, 1F, 3f);
                        gradientColor4 = astolfo(15, 270, 1F, 3f);

                    } else if (ModuleList.colorList.currentMode.equals("Astolfo 2")) {
                        gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(15, 0, a1, a2);
                        gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(15, 90, a3, a4);
                        gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(15, 180, a1, a2);
                        gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(15, 270, a3, a4);
                    } else if (ModuleList.colorList.currentMode.equals("Fade")) {
                        gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(15, 0, onecolor, Color.BLACK);
                        gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(15, 90, onecolor, Color.BLACK);
                        gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(15, 180, onecolor, Color.BLACK);
                        gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(15, 270, onecolor, Color.BLACK);
                    }
                    Color finalgradientColor1 = gradientColor1;
                    Color finalgradientColor2 = gradientColor2;
                    Color finalgradientColor3 = gradientColor3;
                    Color finalgradientColor4 = gradientColor4;
                    Color colora = ColorUtils.TwoColoreffect(new Color(finalgradientColor4.getRGB()), new Color(finalgradientColor1.getRGB()), Math.abs(System.currentTimeMillis() / 10) / 100.0 + 3.0F * (4 * 2.55) / 60);
                    Color colora2 = ColorUtils.TwoColoreffect(new Color(finalgradientColor3.getRGB()), new Color(finalgradientColor2.getRGB()), Math.abs(System.currentTimeMillis() / 10) / 100.0 + 3.0F * (4 * 2.55) / 60);
                    String name = Smertnix.instance.featureManager.getFeature(NameProtect.class).isEnabled() && NameProtect.myName.getCurrentValue() ? "" + "Protected" : "" + Minecraft.player.getName();
                    final String time = "       " + ChatFormatting.WHITE + " | " + name + " | " + ChatFormatting.RESET + "fps - " + Math.round(Minecraft.getDebugFPS());
                    final String t1 = "S";
                    final String t2 = "  U";
                    final String t3 = "    S";
                    RenderUtils.drawBlurredShadow(dwm.getX() + 5 + 1.0F, dwm.getY() + 4 + 1.0F, (float) Minecraft.getMinecraft().tenacity17.getStringWidth(time) + 13, dwm.getHeight() - 0.5F, 15, RenderUtils.injectAlpha(ClientHelper.getClientColor(dwm.getY(), 0, 5), 150));
                    RoundedUtil.drawGradientRound(dwm.getX() + 5, dwm.getY() + 4, (float) Minecraft.getMinecraft().tenacity17.getStringWidth(time) + 13, dwm.getHeight() - 0.5F, 5.0f, ColorUtils2.applyOpacity(finalgradientColor4, 10.85f).brighter(), finalgradientColor1.brighter(), finalgradientColor3.brighter(), finalgradientColor2.brighter());
                    RoundedUtil.drawRound(dwm.getX() + 5 + 1.0F, dwm.getY() + 4 + 1.0F, (float) Minecraft.getMinecraft().tenacity17.getStringWidth(time) + 13 - 2.0F, dwm.getHeight() - 2.0F - 0.5F, 4.0f, Color.BLACK /*new Color(20, 20, 20, 150)*/);
                    Minecraft.getMinecraft().tenacity17.drawStringWithShadow("", dwm.getX() + 11, dwm.getY() + 8.5f, -1);
                    Minecraft.getMinecraft().tenacity17.drawStringWithShadow(time, (float) (dwm.getX() + 9 + Minecraft.getMinecraft().tenacity17.getStringWidth("")), (float) (dwm.getY() + 8), -1);
                    Minecraft.getMinecraft().tenacity17.drawStringWithShadow(t1, (float) (dwm.getX() + 10 + Minecraft.getMinecraft().tenacity17.getStringWidth("")), (float) (dwm.getY() + 8), gradientColor1.getRGB());
                    Minecraft.getMinecraft().tenacity17.drawStringWithShadow(t2, (float) (dwm.getX() + 10 + Minecraft.getMinecraft().tenacity17.getStringWidth("")), (float) (dwm.getY() + 8), gradientColor2.getRGB());
                    Minecraft.getMinecraft().tenacity17.drawStringWithShadow(t3, (float) (dwm.getX() + 11 + Minecraft.getMinecraft().tenacity17.getStringWidth("")), (float) (dwm.getY() + 8), gradientColor3.getRGB());
                    break;
Radar:
public class Radar extends Module {
    public static final NumberSetting size = new NumberSetting("Size", 90, 75, 125, 1);
    public final ListSetting colorMode = new ListSetting("Color", "Colored", "Colored", "Dark");
    public final ListSetting degree = new ListSetting("Degree", "30", "30", "-30");
    private final ColorSetting color1 = new ColorSetting("Color 1", ClientHelper.getClientColor().getRGB());
    private final ColorSetting color2 = new ColorSetting("Color 2", ClientHelper.getAlternateClientColor().getRGB());
    public final BooleanSetting targets = new BooleanSetting("Players",true,() -> true);
    private static NumberSetting xC = new NumberSetting("X",0,-700,700,1);
    private static NumberSetting yC = new NumberSetting("Y",0,-700,700,1);

    private static NumberSetting xCC = new NumberSetting("X",0,-700,700,1);
    private static NumberSetting yCC = new NumberSetting("Y",0,-700,700,1);


    private final List<EntityLivingBase> entities = new ArrayList<>();

    public Radar() {
        super("Radar","Shows entites on a gui", ModuleCategory.Hud);
        //color1.addParent(colorMode, modeSetting -> modeSetting.is("Gradient") || modeSetting.is("Analogous"));
        //color2.addParent(colorMode, modeSetting -> modeSetting.is("Gradient") && !modeSetting.is("Analogous"));
        //degree.addParent(colorMode, modeSetting -> modeSetting.is("Analogous"));
        addSettings(colorMode/*, xCC, yCC*/, size);
    }

    @EventTarget
    private void ShaderEvent(ShaderEvent event) {
        float x = yC.getCurrentValue(), y = yC.getCurrentValue(), size = this.size.getCurrentValue(), middleX = x + size / 2f, middleY = y + size / 2f;
        RoundedUtil.drawRound(x, y, size, size, 6, false, Color.WHITE);
    }

    private Color gradientColor1 = Color.WHITE, gradientColor2 = Color.WHITE, gradientColor3 = Color.WHITE, gradientColor4 = Color.WHITE;


    @EventTarget
    private void onRender2D(EventRender2D eventRender2D) {
        GlStateManager.pushMatrix();
        GlStateManager.translate(-xCC.getCurrentValue(), -yCC.getCurrentValueInt(), 1);
        getEntities();
        dr dr = (dr) Smertnix.instance.draggableHUD.getDraggableComponentByClass(dr.class);
        float x = dr.getX(), y = dr.getY(), size = this.size.getCurrentValue(), middleX = x + size / 2f, middleY = y + size / 2f;
        //float x = yC.getCurrentValue(), y = yC.getCurrentValue(), size = this.size.getCurrentValue(), middleX = x + size / 2f, middleY = y + size / 2f;

        Color lineColor = new Color(255, 255, 255, 30);

        boolean HudMod = true;

            if (colorMode.currentMode.equals("Colored")) {
                Color onecolor = new Color(oneColor.getColorValue());
                Color twocolor = new Color(twoColor.getColorValue());
                if (ModuleList.colorList.currentMode.equals("Rainbow")) {
                    gradientColor1 = ColorUtils.rainbowCol(15, 0, 1, 5);
                    gradientColor2 = ColorUtils.rainbowCol(15, 90, 1, 5);
                    gradientColor3 = ColorUtils.rainbowCol(15, 180, 1, 5);
                    gradientColor4 = ColorUtils.rainbowCol(15, 270, 1, 5);
                } else if (ModuleList.colorList.currentMode.equals("Custom")) {
                    gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(5, 0, onecolor, twocolor);
                    gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(5, 90, onecolor, twocolor);
                    gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(5, 180, onecolor, twocolor);
                    gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(5, 270, onecolor, twocolor);
                } else if (ModuleList.colorList.currentMode.equals("Astolfo")) {
                    gradientColor1 = astolfo(15, 0, 1F, 3f);
                    gradientColor2 = astolfo(15, 90, 1F, 3f);
                    gradientColor3 = astolfo(15, 180, 1F, 3f);
                    gradientColor4 = astolfo(15, 270, 1F, 3f);
                } else if (ModuleList.colorList.currentMode.equals("Fade")) {
                    gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(15, 0, onecolor, Color.BLACK);
                    gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(15, 90, onecolor, Color.BLACK);
                    gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(15, 180, onecolor, Color.BLACK);
                    gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(15, 270, onecolor, Color.BLACK);
                }
                Color finalgradientColor1 = gradientColor1;
                Color finalgradientColor2 = gradientColor2;
                Color finalgradientColor3 = gradientColor3;
                Color finalgradientColor4 = gradientColor4;

                dr drd = (dr) Smertnix.instance.draggableHUD.getDraggableComponentByClass(dr.class);
                drd.setWidth(Radar.size.getCurrentValueInt());
                drd.setHeight(Radar.size.getCurrentValueInt());
                RenderUtils.drawBlurredShadow(drd.getX() + 1, drd.getY() + 1, drd.getWidth() - 2, drd.getHeight() - 2 - 0.5F, 15, gradientColor1);
                RoundedUtil.drawGradientRound(drd.getX(), drd.getY(), drd.getWidth(), drd.getHeight() - 0.5F, 6, ColorUtils2.applyOpacity(gradientColor4, 10.85f).brighter(), gradientColor1.brighter(), gradientColor3.brighter(), gradientColor2.brighter());
                RoundedUtil.drawGradientRound(drd.getX() + 1, drd.getY() + 1, drd.getWidth() - 2, drd.getHeight() - 2 - 0.5F, 6, ColorUtils2.applyOpacity(gradientColor4, 10.85f).darker(), gradientColor1.darker(), gradientColor3.darker(), gradientColor2.darker());

            } else if (colorMode.currentMode.equals("Dark")){
                Color onecolor = new Color(oneColor.getColorValue());
                Color twocolor = new Color(twoColor.getColorValue());
                if (ModuleList.colorList.currentMode.equals("Rainbow")) {
                    gradientColor1 = ColorUtils.rainbowCol(15, 0, 1, 5);
                    gradientColor2 = ColorUtils.rainbowCol(15, 90, 1, 5);
                    gradientColor3 = ColorUtils.rainbowCol(15, 180, 1, 5);
                    gradientColor4 = ColorUtils.rainbowCol(15, 270, 1, 5);
                } else if (ModuleList.colorList.currentMode.equals("Custom")) {
                    gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(5, 0, onecolor, twocolor);
                    gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(5, 90, onecolor, twocolor);
                    gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(5, 180, onecolor, twocolor);
                    gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(5, 270, onecolor, twocolor);
                } else if (ModuleList.colorList.currentMode.equals("Astolfo")) {
                    gradientColor1 = astolfo(15, 0, 1F, 3f);
                    gradientColor2 = astolfo(15, 90, 1F, 3f);
                    gradientColor3 = astolfo(15, 180, 1F, 3f);
                    gradientColor4 = astolfo(15, 270, 1F, 3f);
                } else if (ModuleList.colorList.currentMode.equals("Fade")) {
                    gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(15, 0, onecolor, Color.BLACK);
                    gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(15, 90, onecolor, Color.BLACK);
                    gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(15, 180, onecolor, Color.BLACK);
                    gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(15, 270, onecolor, Color.BLACK);
                }

                Color finalgradientColor1 = gradientColor1;
                Color finalgradientColor2 = gradientColor2;
                Color finalgradientColor3 = gradientColor3;
                Color finalgradientColor4 = gradientColor4;

                dr drd = (dr) Smertnix.instance.draggableHUD.getDraggableComponentByClass(dr.class);
                drd.setWidth(Radar.size.getCurrentValueInt());
                drd.setHeight(Radar.size.getCurrentValueInt());
                RenderUtils.drawBlurredShadow(drd.getX() + 1, drd.getY() + 1, drd.getWidth() - 2, drd.getHeight() - 2 - 0.5F, 15, gradientColor1);
                RoundedUtil.drawGradientRound(drd.getX(), drd.getY(), drd.getWidth(), drd.getHeight() - 0.5F, 6/*, new Color(10, 10, 10, 80), new Color(-2)*/, ColorUtils2.applyOpacity(gradientColor4, 10.85f).brighter(), gradientColor1.brighter(), gradientColor3.brighter(), gradientColor2.brighter());
                RoundedUtil.drawRound(drd.getX() + 1, drd.getY() + 1, drd.getWidth() - 2, drd.getHeight() - 2 - 0.5F, 6/*, new Color(10, 10, 10, 80), new Color(-2)*/, Color.BLACK);
            }



        {
            Gui.drawRect2(x - 1, y + (size / 2f - .5), size + 2, 1, lineColor.getRGB());
            Gui.drawRect2(x + (size / 2f - .5), y - 1, 1, size + 2, lineColor.getRGB());
        }/*else {
            Gui.drawRect2(x + 1, y + (size / 2f - .5), size - 2, 1, lineColor.getRGB());
            Gui.drawRect2(x + (size / 2f - .5), y + 1, 1, size - 2, lineColor.getRGB());
        }*/

        StencilUtil.initStencilToWrite();
        RenderUtils.renderRoundedRect(x, y, size, size, 6, -1);
        StencilUtil.readStencilBuffer(1);
        GLUtil.rotate(middleX, middleY, Minecraft.player.rotationYaw, () -> {
            for (EntityLivingBase entity : entities) {
                double xDiff = MathUtils.interpolate(entity.prevPosX, entity.posX, Minecraft.timer.renderPartialTicks) - MathUtils.interpolate(Minecraft.player.prevPosX, Minecraft.player.posX, Minecraft.timer.renderPartialTicks);
                double zDiff = MathUtils.interpolate(entity.prevPosZ, entity.posZ, Minecraft.timer.renderPartialTicks) - MathUtils.interpolate(Minecraft.player.prevPosZ, Minecraft.player.posZ, Minecraft.timer.renderPartialTicks);
                if ((xDiff + zDiff) < (size / 2f)) {
                    float translatedX = (float) (middleX - xDiff);
                    float translatedY = (float) (middleY - zDiff);
                    RoundedUtil.drawRound(translatedX, translatedY, 3, 3, 1f, new Color(255, 255, 255, 255));
                    //Gui.drawRect2(translatedX, translatedY, 3, 3, -1);
                }
            }
        });
        StencilUtil.uninitStencilBuffer();
        GlStateManager.popMatrix();
    }


    public void getEntities() {
        entities.clear();
        for (Entity entity : Minecraft.world.loadedEntityList) {
            if (entity instanceof EntityLivingBase) {
                if (entity instanceof EntityPlayer && entity != null && !entity.isInvisible()) {
                    entities.add((EntityLivingBase) entity);
                }
            }
        }
    }


    @Override
    public void onEnable() {
        super.onEnable();
    }
}
 
Последнее редактирование:
Забаненный
Статус
Оффлайн
Регистрация
23 Апр 2023
Сообщения
22
Реакции[?]
0
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
.
 
Последнее редактирование:
Начинающий
Статус
Оффлайн
Регистрация
17 Апр 2023
Сообщения
181
Реакции[?]
2
Поинты[?]
0
дай colorutils свой
ColorUtils2:
public class ColorUtils2 implements Helper {

    public static Color[] getAnalogousColor(Color color) {
        Color[] colors = new Color[2];
        float[] hsb = Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), null);

        float degree = 30 / 360f;

        float newHueAdded = hsb[0] + degree;
        colors[0] = new Color(Color.HSBtoRGB(newHueAdded, hsb[1], hsb[2]));

        float newHueSubtracted = hsb[0] - degree;

        colors[1] = new Color(Color.HSBtoRGB(newHueSubtracted, hsb[1], hsb[2]));

        return colors;
    }

    public static Color hslToRGB(float[] hsl) {
        float red, green, blue;

        if (hsl[1] == 0) {
            red = green = blue = 1;
        } else {
            float q = hsl[2] < .5 ? hsl[2] * (1 + hsl[1]) : hsl[2] + hsl[1] - hsl[2] * hsl[1];
            float p = 2 * hsl[2] - q;

            red = hueToRGB(p, q, hsl[0] + 1 / 3f);
            green = hueToRGB(p, q, hsl[0]);
            blue = hueToRGB(p, q, hsl[0] - 1 / 3f);
        }

        red *= 255;
        green *= 255;
        blue *= 255;

        return new Color((int) red, (int) green, (int) blue);
    }

    public static float hueToRGB(float p, float q, float t) {
        float newT = t;
        if (newT < 0) newT += 1;
        if (newT > 1) newT -= 1;
        if (newT < 1 / 6f) return p + (q - p) * 6 * newT;
        if (newT < .5f) return q;
        if (newT < 2 / 3f) return p + (q - p) * (2 / 3f - newT) * 6;
        return p;
    }

    public static float[] rgbToHSL(Color rgb) {
        float red = rgb.getRed() / 255f;
        float green = rgb.getGreen() / 255f;
        float blue = rgb.getBlue() / 255f;

        float max = Math.max(Math.max(red, green), blue);
        float min = Math.min(Math.min(red, green), blue);
        float c = (max + min) / 2f;
        float[] hsl = new float[]{c, c, c};

        if (max == min) {
            hsl[0] = hsl[1] = 0;
        } else {
            float d = max - min;
            hsl[1] = hsl[2] > .5 ? d / (2 - max - min) : d / (max + min);

            if (max == red) {
                hsl[0] = (green - blue) / d + (green < blue ? 6 : 0);
            } else if (max == blue) {
                hsl[0] = (blue - red) / d + 2;
            } else if (max == green) {
                hsl[0] = (red - green) / d + 4;
            }
            hsl[0] /= 6;
        }
        return hsl;
    }

    public static Color imitateTransparency(Color backgroundColor, Color accentColor, float percentage) {
        return new Color(ColorUtils2.interpolateColor(backgroundColor, accentColor, (255 * percentage) / 255));
    }

    public static int applyOpacity(int color, float opacity) {
        Color old = new Color(color);
        return applyOpacity(old, opacity).getRGB();
    }

    public static Color applyOpacity(Color color, float opacity) {
        opacity = Math.min(1, Math.max(0, opacity));
        return new Color(color.getRed(), color.getGreen(), color.getBlue(), (int) (color.getAlpha() * opacity));
    }

    public static Color darker(Color color, float FACTOR) {
        return new Color(Math.max((int) (color.getRed() * FACTOR), 0),
                Math.max((int) (color.getGreen() * FACTOR), 0),
                Math.max((int) (color.getBlue() * FACTOR), 0),
                color.getAlpha());
    }

    public static Color brighter(Color color, float FACTOR) {
        int r = color.getRed();
        int g = color.getGreen();
        int b = color.getBlue();
        int alpha = color.getAlpha();
        int i = (int) (1.0 / (1.0 - FACTOR));
        if (r == 0 && g == 0 && b == 0) {
            return new Color(i, i, i, alpha);
        }
        if (r > 0 && r < i) r = i;
        if (g > 0 && g < i) g = i;
        if (b > 0 && b < i) b = i;

        return new Color(Math.min((int) (r / FACTOR), 255), Math.min((int) (g / FACTOR), 255), Math.min((int) (b / FACTOR), 255), alpha);
    }

    /**
     * This method gets the average color of an image
     * performance of this goes as O((width * height) / step)
     */
    public static Color averageColor(BufferedImage bi, int width, int height, int pixelStep) {
        int[] color = new int[3];
        for (int x = 0; x < width; x += pixelStep) {
            for (int y = 0; y < height; y += pixelStep) {
                Color pixel = new Color(bi.getRGB(x, y));
                color[0] += pixel.getRed();
                color[1] += pixel.getGreen();
                color[2] += pixel.getBlue();
            }
        }

        int num = (width * height) / (pixelStep * pixelStep);
        return new Color(color[0] / num, color[1] / num, color[2] / num);
    }

    public static Color rainbow(int speed, int index, float saturation, float brightness, float opacity) {
        int angle = (int) ((System.currentTimeMillis() / speed + index) % 360);
        float hue = angle / 360f;
        Color color = new Color(Color.HSBtoRGB(hue, saturation, brightness));
        return new Color(color.getRed(), color.getGreen(), color.getBlue(), Math.max(0, Math.min(255, (int) (opacity * 255))));
    }

    public static Color interpolateColorsBackAndForth(int speed, int index, Color start, Color end) {
        int angle = (int) (((System.currentTimeMillis()) / speed + index) % 360);
        angle = (angle >= 180 ? 360 - angle : angle) * 2;
        return ColorUtils2.interpolateColorC(start, end, angle / 360f);
    }

    public static int interpolateColor(Color color1, Color color2, float amount) {
        amount = Math.min(1, Math.max(0, amount));
        return interpolateColorC(color1, color2, amount).getRGB();
    }

    public static int interpolateColor(int color1, int color2, float amount) {
        amount = Math.min(1, Math.max(0, amount));
        Color cColor1 = new Color(color1);
        Color cColor2 = new Color(color2);
        return interpolateColorC(cColor1, cColor2, amount).getRGB();
    }

    public static Color interpolateColorC(Color color1, Color color2, float amount) {
        amount = Math.min(1, Math.max(0, amount));
        return new Color(interpolateInt(color1.getRed(), color2.getRed(), amount),
                interpolateInt(color1.getGreen(), color2.getGreen(), amount),
                interpolateInt(color1.getBlue(), color2.getBlue(), amount),
                interpolateInt(color1.getAlpha(), color2.getAlpha(), amount));
    }

    public static Color interpolateColorHue(Color color1, Color color2, float amount) {
        amount = Math.min(1, Math.max(0, amount));

        float[] color1HSB = Color.RGBtoHSB(color1.getRed(), color1.getGreen(), color1.getBlue(), null);
        float[] color2HSB = Color.RGBtoHSB(color2.getRed(), color2.getGreen(), color2.getBlue(), null);

        Color resultColor = Color.getHSBColor(interpolateFloat(color1HSB[0], color2HSB[0], amount), interpolateFloat(color1HSB[1], color2HSB[1], amount), interpolateFloat(color1HSB[2], color2HSB[2], amount));

        return new Color(resultColor.getRed(), resultColor.getGreen(), resultColor.getBlue(), interpolateInt(color1.getAlpha(), color2.getAlpha(), amount));
    }


    //Fade a color in and out with a specified alpha value ranging from 0-1
    public static Color fade(int speed, int index, Color color, float alpha) {
        float[] hsb = Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), null);
        int angle = (int) ((System.currentTimeMillis() / speed + index) % 360);
        angle = (angle > 180 ? 360 - angle : angle) + 180;

        Color colorHSB = new Color(Color.HSBtoRGB(hsb[0], hsb[1], angle / 360f));

        return new Color(colorHSB.getRed(), colorHSB.getGreen(), colorHSB.getBlue(), Math.max(0, Math.min(255, (int) (alpha * 255))));
    }


    private static float getAnimationEquation(int index, int speed) {
        int angle = (int) ((System.currentTimeMillis() / speed + index) % 360);
        return ((angle > 180 ? 360 - angle : angle) + 180) / 360f;
    }

    public static int[] createColorArray(int color) {
        return new int[]{bitChangeColor(color, 16), bitChangeColor(color, 8), bitChangeColor(color, 0), bitChangeColor(color, 24)};
    }

    public static int getOppositeColor(int color) {
        int R = bitChangeColor(color, 0);
        int G = bitChangeColor(color, 8);
        int B = bitChangeColor(color, 16);
        int A = bitChangeColor(color, 24);
        R = 255 - R;
        G = 255 - G;
        B = 255 - B;
        return R + (G << 8) + (B << 16) + (A << 24);
    }

    private static int bitChangeColor(int color, int bitChange) {
        return (color >> bitChange) & 255;
    }
}
 
Начинающий
Статус
Онлайн
Регистрация
26 Янв 2023
Сообщения
122
Реакции[?]
1
Поинты[?]
1K
это для рич??
ну типа да

ss:
Посмотреть вложение 251406
Посмотреть вложение 251408

wt:
                    DragWaterMark dwm = (DragWaterMark) Smertnix.instance.draggableHUD.getDraggableComponentByClass(DragWaterMark.class);
                    dwm.setWidth(134);
                    dwm.setHeight(15);
                    int y = dwm.getY();
                    Color onecolor = new Color(oneColor.getColorValue());
                    Color twocolor = new Color(ModuleList.twoColor.getColorValue());
                    Color a1 = new Color(101, 0, 255);
                    Color a2 = new Color(3, 24, 250);
                    Color a3 = new Color(0, 255, 196);
                    Color a4 = new Color(223, 17, 255);
                    Color g1 = ColorUtils2.interpolateColorsBackAndForth(15, 270, a4, a1);
                    Color gg2 = ColorUtils2.interpolateColorsBackAndForth(15, 270, a3, a2);
                    Color gg3 = ColorUtils2.interpolateColorsBackAndForth(15, 270, g1, gg2);
                    if (ModuleList.colorList.currentMode.equals("Rainbow")) {
                        gradientColor1 = ColorUtils.rainbowCol(15, 0, 1, 5);
                        gradientColor2 = ColorUtils.rainbowCol(15, 90, 1, 5);
                        gradientColor3 = ColorUtils.rainbowCol(15, 180, 1, 5);
                        gradientColor4 = ColorUtils.rainbowCol(15, 270, 1, 5);
                    } else if (ModuleList.colorList.currentMode.equals("Custom")) {
                        gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(15, 0, onecolor, twocolor);
                        gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(15, 90, onecolor, twocolor);
                        gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(15, 180, onecolor, twocolor);
                        gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(15, 270, onecolor, twocolor);
                    } else if (ModuleList.colorList.currentMode.equals("Astolfo")) {
                        gradientColor1 = astolfo(15, 0, 1F, 3f);
                        gradientColor2 = astolfo(15, 90, 1F, 3f);
                        gradientColor3 = astolfo(15, 180, 1F, 3f);
                        gradientColor4 = astolfo(15, 270, 1F, 3f);

                    } else if (ModuleList.colorList.currentMode.equals("Astolfo 2")) {
                        gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(15, 0, a1, a2);
                        gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(15, 90, a3, a4);
                        gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(15, 180, a1, a2);
                        gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(15, 270, a3, a4);
                    } else if (ModuleList.colorList.currentMode.equals("Fade")) {
                        gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(15, 0, onecolor, Color.BLACK);
                        gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(15, 90, onecolor, Color.BLACK);
                        gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(15, 180, onecolor, Color.BLACK);
                        gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(15, 270, onecolor, Color.BLACK);
                    }
                    Color finalgradientColor1 = gradientColor1;
                    Color finalgradientColor2 = gradientColor2;
                    Color finalgradientColor3 = gradientColor3;
                    Color finalgradientColor4 = gradientColor4;
                    Color colora = ColorUtils.TwoColoreffect(new Color(finalgradientColor4.getRGB()), new Color(finalgradientColor1.getRGB()), Math.abs(System.currentTimeMillis() / 10) / 100.0 + 3.0F * (4 * 2.55) / 60);
                    Color colora2 = ColorUtils.TwoColoreffect(new Color(finalgradientColor3.getRGB()), new Color(finalgradientColor2.getRGB()), Math.abs(System.currentTimeMillis() / 10) / 100.0 + 3.0F * (4 * 2.55) / 60);
                    String name = Smertnix.instance.featureManager.getFeature(NameProtect.class).isEnabled() && NameProtect.myName.getCurrentValue() ? "" + "Protected" : "" + Minecraft.player.getName();
                    final String time = "       " + ChatFormatting.WHITE + " | " + name + " | " + ChatFormatting.RESET + "fps - " + Math.round(Minecraft.getDebugFPS());
                    final String t1 = "S";
                    final String t2 = "  U";
                    final String t3 = "    S";
                    RenderUtils.drawBlurredShadow(dwm.getX() + 5 + 1.0F, dwm.getY() + 4 + 1.0F, (float) Minecraft.getMinecraft().tenacity17.getStringWidth(time) + 13, dwm.getHeight() - 0.5F, 15, RenderUtils.injectAlpha(ClientHelper.getClientColor(dwm.getY(), 0, 5), 150));
                    RoundedUtil.drawGradientRound(dwm.getX() + 5, dwm.getY() + 4, (float) Minecraft.getMinecraft().tenacity17.getStringWidth(time) + 13, dwm.getHeight() - 0.5F, 5.0f, ColorUtils2.applyOpacity(finalgradientColor4, 10.85f).brighter(), finalgradientColor1.brighter(), finalgradientColor3.brighter(), finalgradientColor2.brighter());
                    RoundedUtil.drawRound(dwm.getX() + 5 + 1.0F, dwm.getY() + 4 + 1.0F, (float) Minecraft.getMinecraft().tenacity17.getStringWidth(time) + 13 - 2.0F, dwm.getHeight() - 2.0F - 0.5F, 4.0f, Color.BLACK /*new Color(20, 20, 20, 150)*/);
                    Minecraft.getMinecraft().tenacity17.drawStringWithShadow("", dwm.getX() + 11, dwm.getY() + 8.5f, -1);
                    Minecraft.getMinecraft().tenacity17.drawStringWithShadow(time, (float) (dwm.getX() + 9 + Minecraft.getMinecraft().tenacity17.getStringWidth("")), (float) (dwm.getY() + 8), -1);
                    Minecraft.getMinecraft().tenacity17.drawStringWithShadow(t1, (float) (dwm.getX() + 10 + Minecraft.getMinecraft().tenacity17.getStringWidth("")), (float) (dwm.getY() + 8), gradientColor1.getRGB());
                    Minecraft.getMinecraft().tenacity17.drawStringWithShadow(t2, (float) (dwm.getX() + 10 + Minecraft.getMinecraft().tenacity17.getStringWidth("")), (float) (dwm.getY() + 8), gradientColor2.getRGB());
                    Minecraft.getMinecraft().tenacity17.drawStringWithShadow(t3, (float) (dwm.getX() + 11 + Minecraft.getMinecraft().tenacity17.getStringWidth("")), (float) (dwm.getY() + 8), gradientColor3.getRGB());
                    break;
Radar:
public class Radar extends Module {
    public static final NumberSetting size = new NumberSetting("Size", 90, 75, 125, 1);
    public final ListSetting colorMode = new ListSetting("Color", "Colored", "Colored", "Dark");
    public final ListSetting degree = new ListSetting("Degree", "30", "30", "-30");
    private final ColorSetting color1 = new ColorSetting("Color 1", ClientHelper.getClientColor().getRGB());
    private final ColorSetting color2 = new ColorSetting("Color 2", ClientHelper.getAlternateClientColor().getRGB());
    public final BooleanSetting targets = new BooleanSetting("Players",true,() -> true);
    private static NumberSetting xC = new NumberSetting("X",0,-700,700,1);
    private static NumberSetting yC = new NumberSetting("Y",0,-700,700,1);

    private static NumberSetting xCC = new NumberSetting("X",0,-700,700,1);
    private static NumberSetting yCC = new NumberSetting("Y",0,-700,700,1);


    private final List<EntityLivingBase> entities = new ArrayList<>();

    public Radar() {
        super("Radar","Shows entites on a gui", ModuleCategory.Hud);
        //color1.addParent(colorMode, modeSetting -> modeSetting.is("Gradient") || modeSetting.is("Analogous"));
        //color2.addParent(colorMode, modeSetting -> modeSetting.is("Gradient") && !modeSetting.is("Analogous"));
        //degree.addParent(colorMode, modeSetting -> modeSetting.is("Analogous"));
        addSettings(colorMode/*, xCC, yCC*/, size);
    }

    @EventTarget
    private void ShaderEvent(ShaderEvent event) {
        float x = yC.getCurrentValue(), y = yC.getCurrentValue(), size = this.size.getCurrentValue(), middleX = x + size / 2f, middleY = y + size / 2f;
        RoundedUtil.drawRound(x, y, size, size, 6, false, Color.WHITE);
    }

    private Color gradientColor1 = Color.WHITE, gradientColor2 = Color.WHITE, gradientColor3 = Color.WHITE, gradientColor4 = Color.WHITE;


    @EventTarget
    private void onRender2D(EventRender2D eventRender2D) {
        GlStateManager.pushMatrix();
        GlStateManager.translate(-xCC.getCurrentValue(), -yCC.getCurrentValueInt(), 1);
        getEntities();
        dr dr = (dr) Smertnix.instance.draggableHUD.getDraggableComponentByClass(dr.class);
        float x = dr.getX(), y = dr.getY(), size = this.size.getCurrentValue(), middleX = x + size / 2f, middleY = y + size / 2f;
        //float x = yC.getCurrentValue(), y = yC.getCurrentValue(), size = this.size.getCurrentValue(), middleX = x + size / 2f, middleY = y + size / 2f;

        Color lineColor = new Color(255, 255, 255, 30);

        boolean HudMod = true;

            if (colorMode.currentMode.equals("Colored")) {
                Color onecolor = new Color(oneColor.getColorValue());
                Color twocolor = new Color(twoColor.getColorValue());
                if (ModuleList.colorList.currentMode.equals("Rainbow")) {
                    gradientColor1 = ColorUtils.rainbowCol(15, 0, 1, 5);
                    gradientColor2 = ColorUtils.rainbowCol(15, 90, 1, 5);
                    gradientColor3 = ColorUtils.rainbowCol(15, 180, 1, 5);
                    gradientColor4 = ColorUtils.rainbowCol(15, 270, 1, 5);
                } else if (ModuleList.colorList.currentMode.equals("Custom")) {
                    gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(5, 0, onecolor, twocolor);
                    gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(5, 90, onecolor, twocolor);
                    gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(5, 180, onecolor, twocolor);
                    gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(5, 270, onecolor, twocolor);
                } else if (ModuleList.colorList.currentMode.equals("Astolfo")) {
                    gradientColor1 = astolfo(15, 0, 1F, 3f);
                    gradientColor2 = astolfo(15, 90, 1F, 3f);
                    gradientColor3 = astolfo(15, 180, 1F, 3f);
                    gradientColor4 = astolfo(15, 270, 1F, 3f);
                } else if (ModuleList.colorList.currentMode.equals("Fade")) {
                    gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(15, 0, onecolor, Color.BLACK);
                    gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(15, 90, onecolor, Color.BLACK);
                    gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(15, 180, onecolor, Color.BLACK);
                    gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(15, 270, onecolor, Color.BLACK);
                }
                Color finalgradientColor1 = gradientColor1;
                Color finalgradientColor2 = gradientColor2;
                Color finalgradientColor3 = gradientColor3;
                Color finalgradientColor4 = gradientColor4;

                dr drd = (dr) Smertnix.instance.draggableHUD.getDraggableComponentByClass(dr.class);
                drd.setWidth(Radar.size.getCurrentValueInt());
                drd.setHeight(Radar.size.getCurrentValueInt());
                RenderUtils.drawBlurredShadow(drd.getX() + 1, drd.getY() + 1, drd.getWidth() - 2, drd.getHeight() - 2 - 0.5F, 15, gradientColor1);
                RoundedUtil.drawGradientRound(drd.getX(), drd.getY(), drd.getWidth(), drd.getHeight() - 0.5F, 6, ColorUtils2.applyOpacity(gradientColor4, 10.85f).brighter(), gradientColor1.brighter(), gradientColor3.brighter(), gradientColor2.brighter());
                RoundedUtil.drawGradientRound(drd.getX() + 1, drd.getY() + 1, drd.getWidth() - 2, drd.getHeight() - 2 - 0.5F, 6, ColorUtils2.applyOpacity(gradientColor4, 10.85f).darker(), gradientColor1.darker(), gradientColor3.darker(), gradientColor2.darker());

            } else if (colorMode.currentMode.equals("Dark")){
                Color onecolor = new Color(oneColor.getColorValue());
                Color twocolor = new Color(twoColor.getColorValue());
                if (ModuleList.colorList.currentMode.equals("Rainbow")) {
                    gradientColor1 = ColorUtils.rainbowCol(15, 0, 1, 5);
                    gradientColor2 = ColorUtils.rainbowCol(15, 90, 1, 5);
                    gradientColor3 = ColorUtils.rainbowCol(15, 180, 1, 5);
                    gradientColor4 = ColorUtils.rainbowCol(15, 270, 1, 5);
                } else if (ModuleList.colorList.currentMode.equals("Custom")) {
                    gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(5, 0, onecolor, twocolor);
                    gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(5, 90, onecolor, twocolor);
                    gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(5, 180, onecolor, twocolor);
                    gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(5, 270, onecolor, twocolor);
                } else if (ModuleList.colorList.currentMode.equals("Astolfo")) {
                    gradientColor1 = astolfo(15, 0, 1F, 3f);
                    gradientColor2 = astolfo(15, 90, 1F, 3f);
                    gradientColor3 = astolfo(15, 180, 1F, 3f);
                    gradientColor4 = astolfo(15, 270, 1F, 3f);
                } else if (ModuleList.colorList.currentMode.equals("Fade")) {
                    gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(15, 0, onecolor, Color.BLACK);
                    gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(15, 90, onecolor, Color.BLACK);
                    gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(15, 180, onecolor, Color.BLACK);
                    gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(15, 270, onecolor, Color.BLACK);
                }

                Color finalgradientColor1 = gradientColor1;
                Color finalgradientColor2 = gradientColor2;
                Color finalgradientColor3 = gradientColor3;
                Color finalgradientColor4 = gradientColor4;

                dr drd = (dr) Smertnix.instance.draggableHUD.getDraggableComponentByClass(dr.class);
                drd.setWidth(Radar.size.getCurrentValueInt());
                drd.setHeight(Radar.size.getCurrentValueInt());
                RenderUtils.drawBlurredShadow(drd.getX() + 1, drd.getY() + 1, drd.getWidth() - 2, drd.getHeight() - 2 - 0.5F, 15, gradientColor1);
                RoundedUtil.drawGradientRound(drd.getX(), drd.getY(), drd.getWidth(), drd.getHeight() - 0.5F, 6/*, new Color(10, 10, 10, 80), new Color(-2)*/, ColorUtils2.applyOpacity(gradientColor4, 10.85f).brighter(), gradientColor1.brighter(), gradientColor3.brighter(), gradientColor2.brighter());
                RoundedUtil.drawRound(drd.getX() + 1, drd.getY() + 1, drd.getWidth() - 2, drd.getHeight() - 2 - 0.5F, 6/*, new Color(10, 10, 10, 80), new Color(-2)*/, Color.BLACK);
            }



        {
            Gui.drawRect2(x - 1, y + (size / 2f - .5), size + 2, 1, lineColor.getRGB());
            Gui.drawRect2(x + (size / 2f - .5), y - 1, 1, size + 2, lineColor.getRGB());
        }/*else {
            Gui.drawRect2(x + 1, y + (size / 2f - .5), size - 2, 1, lineColor.getRGB());
            Gui.drawRect2(x + (size / 2f - .5), y + 1, 1, size - 2, lineColor.getRGB());
        }*/

        StencilUtil.initStencilToWrite();
        RenderUtils.renderRoundedRect(x, y, size, size, 6, -1);
        StencilUtil.readStencilBuffer(1);
        GLUtil.rotate(middleX, middleY, Minecraft.player.rotationYaw, () -> {
            for (EntityLivingBase entity : entities) {
                double xDiff = MathUtils.interpolate(entity.prevPosX, entity.posX, Minecraft.timer.renderPartialTicks) - MathUtils.interpolate(Minecraft.player.prevPosX, Minecraft.player.posX, Minecraft.timer.renderPartialTicks);
                double zDiff = MathUtils.interpolate(entity.prevPosZ, entity.posZ, Minecraft.timer.renderPartialTicks) - MathUtils.interpolate(Minecraft.player.prevPosZ, Minecraft.player.posZ, Minecraft.timer.renderPartialTicks);
                if ((xDiff + zDiff) < (size / 2f)) {
                    float translatedX = (float) (middleX - xDiff);
                    float translatedY = (float) (middleY - zDiff);
                    RoundedUtil.drawRound(translatedX, translatedY, 3, 3, 1f, new Color(255, 255, 255, 255));
                    //Gui.drawRect2(translatedX, translatedY, 3, 3, -1);
                }
            }
        });
        StencilUtil.uninitStencilBuffer();
        GlStateManager.popMatrix();
    }


    public void getEntities() {
        entities.clear();
        for (Entity entity : Minecraft.world.loadedEntityList) {
            if (entity instanceof EntityLivingBase) {
                if (entity instanceof EntityPlayer && entity != null && !entity.isInvisible()) {
                    entities.add((EntityLivingBase) entity);
                }
            }
        }
    }


    @Override
    public void onEnable() {
        super.onEnable();
    }
}
 
Эксперт
Статус
Оффлайн
Регистрация
14 Ноя 2020
Сообщения
1,799
Реакции[?]
586
Поинты[?]
2K
ну типа да

ss:
Посмотреть вложение 251406
Посмотреть вложение 251408

wt:
                    DragWaterMark dwm = (DragWaterMark) Smertnix.instance.draggableHUD.getDraggableComponentByClass(DragWaterMark.class);
                    dwm.setWidth(134);
                    dwm.setHeight(15);
                    int y = dwm.getY();
                    Color onecolor = new Color(oneColor.getColorValue());
                    Color twocolor = new Color(ModuleList.twoColor.getColorValue());
                    Color a1 = new Color(101, 0, 255);
                    Color a2 = new Color(3, 24, 250);
                    Color a3 = new Color(0, 255, 196);
                    Color a4 = new Color(223, 17, 255);
                    Color g1 = ColorUtils2.interpolateColorsBackAndForth(15, 270, a4, a1);
                    Color gg2 = ColorUtils2.interpolateColorsBackAndForth(15, 270, a3, a2);
                    Color gg3 = ColorUtils2.interpolateColorsBackAndForth(15, 270, g1, gg2);
                    if (ModuleList.colorList.currentMode.equals("Rainbow")) {
                        gradientColor1 = ColorUtils.rainbowCol(15, 0, 1, 5);
                        gradientColor2 = ColorUtils.rainbowCol(15, 90, 1, 5);
                        gradientColor3 = ColorUtils.rainbowCol(15, 180, 1, 5);
                        gradientColor4 = ColorUtils.rainbowCol(15, 270, 1, 5);
                    } else if (ModuleList.colorList.currentMode.equals("Custom")) {
                        gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(15, 0, onecolor, twocolor);
                        gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(15, 90, onecolor, twocolor);
                        gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(15, 180, onecolor, twocolor);
                        gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(15, 270, onecolor, twocolor);
                    } else if (ModuleList.colorList.currentMode.equals("Astolfo")) {
                        gradientColor1 = astolfo(15, 0, 1F, 3f);
                        gradientColor2 = astolfo(15, 90, 1F, 3f);
                        gradientColor3 = astolfo(15, 180, 1F, 3f);
                        gradientColor4 = astolfo(15, 270, 1F, 3f);

                    } else if (ModuleList.colorList.currentMode.equals("Astolfo 2")) {
                        gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(15, 0, a1, a2);
                        gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(15, 90, a3, a4);
                        gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(15, 180, a1, a2);
                        gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(15, 270, a3, a4);
                    } else if (ModuleList.colorList.currentMode.equals("Fade")) {
                        gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(15, 0, onecolor, Color.BLACK);
                        gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(15, 90, onecolor, Color.BLACK);
                        gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(15, 180, onecolor, Color.BLACK);
                        gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(15, 270, onecolor, Color.BLACK);
                    }
                    Color finalgradientColor1 = gradientColor1;
                    Color finalgradientColor2 = gradientColor2;
                    Color finalgradientColor3 = gradientColor3;
                    Color finalgradientColor4 = gradientColor4;
                    Color colora = ColorUtils.TwoColoreffect(new Color(finalgradientColor4.getRGB()), new Color(finalgradientColor1.getRGB()), Math.abs(System.currentTimeMillis() / 10) / 100.0 + 3.0F * (4 * 2.55) / 60);
                    Color colora2 = ColorUtils.TwoColoreffect(new Color(finalgradientColor3.getRGB()), new Color(finalgradientColor2.getRGB()), Math.abs(System.currentTimeMillis() / 10) / 100.0 + 3.0F * (4 * 2.55) / 60);
                    String name = Smertnix.instance.featureManager.getFeature(NameProtect.class).isEnabled() && NameProtect.myName.getCurrentValue() ? "" + "Protected" : "" + Minecraft.player.getName();
                    final String time = "       " + ChatFormatting.WHITE + " | " + name + " | " + ChatFormatting.RESET + "fps - " + Math.round(Minecraft.getDebugFPS());
                    final String t1 = "S";
                    final String t2 = "  U";
                    final String t3 = "    S";
                    RenderUtils.drawBlurredShadow(dwm.getX() + 5 + 1.0F, dwm.getY() + 4 + 1.0F, (float) Minecraft.getMinecraft().tenacity17.getStringWidth(time) + 13, dwm.getHeight() - 0.5F, 15, RenderUtils.injectAlpha(ClientHelper.getClientColor(dwm.getY(), 0, 5), 150));
                    RoundedUtil.drawGradientRound(dwm.getX() + 5, dwm.getY() + 4, (float) Minecraft.getMinecraft().tenacity17.getStringWidth(time) + 13, dwm.getHeight() - 0.5F, 5.0f, ColorUtils2.applyOpacity(finalgradientColor4, 10.85f).brighter(), finalgradientColor1.brighter(), finalgradientColor3.brighter(), finalgradientColor2.brighter());
                    RoundedUtil.drawRound(dwm.getX() + 5 + 1.0F, dwm.getY() + 4 + 1.0F, (float) Minecraft.getMinecraft().tenacity17.getStringWidth(time) + 13 - 2.0F, dwm.getHeight() - 2.0F - 0.5F, 4.0f, Color.BLACK /*new Color(20, 20, 20, 150)*/);
                    Minecraft.getMinecraft().tenacity17.drawStringWithShadow("", dwm.getX() + 11, dwm.getY() + 8.5f, -1);
                    Minecraft.getMinecraft().tenacity17.drawStringWithShadow(time, (float) (dwm.getX() + 9 + Minecraft.getMinecraft().tenacity17.getStringWidth("")), (float) (dwm.getY() + 8), -1);
                    Minecraft.getMinecraft().tenacity17.drawStringWithShadow(t1, (float) (dwm.getX() + 10 + Minecraft.getMinecraft().tenacity17.getStringWidth("")), (float) (dwm.getY() + 8), gradientColor1.getRGB());
                    Minecraft.getMinecraft().tenacity17.drawStringWithShadow(t2, (float) (dwm.getX() + 10 + Minecraft.getMinecraft().tenacity17.getStringWidth("")), (float) (dwm.getY() + 8), gradientColor2.getRGB());
                    Minecraft.getMinecraft().tenacity17.drawStringWithShadow(t3, (float) (dwm.getX() + 11 + Minecraft.getMinecraft().tenacity17.getStringWidth("")), (float) (dwm.getY() + 8), gradientColor3.getRGB());
                    break;
Radar:
public class Radar extends Module {
    public static final NumberSetting size = new NumberSetting("Size", 90, 75, 125, 1);
    public final ListSetting colorMode = new ListSetting("Color", "Colored", "Colored", "Dark");
    public final ListSetting degree = new ListSetting("Degree", "30", "30", "-30");
    private final ColorSetting color1 = new ColorSetting("Color 1", ClientHelper.getClientColor().getRGB());
    private final ColorSetting color2 = new ColorSetting("Color 2", ClientHelper.getAlternateClientColor().getRGB());
    public final BooleanSetting targets = new BooleanSetting("Players",true,() -> true);
    private static NumberSetting xC = new NumberSetting("X",0,-700,700,1);
    private static NumberSetting yC = new NumberSetting("Y",0,-700,700,1);

    private static NumberSetting xCC = new NumberSetting("X",0,-700,700,1);
    private static NumberSetting yCC = new NumberSetting("Y",0,-700,700,1);


    private final List<EntityLivingBase> entities = new ArrayList<>();

    public Radar() {
        super("Radar","Shows entites on a gui", ModuleCategory.Hud);
        //color1.addParent(colorMode, modeSetting -> modeSetting.is("Gradient") || modeSetting.is("Analogous"));
        //color2.addParent(colorMode, modeSetting -> modeSetting.is("Gradient") && !modeSetting.is("Analogous"));
        //degree.addParent(colorMode, modeSetting -> modeSetting.is("Analogous"));
        addSettings(colorMode/*, xCC, yCC*/, size);
    }

    @EventTarget
    private void ShaderEvent(ShaderEvent event) {
        float x = yC.getCurrentValue(), y = yC.getCurrentValue(), size = this.size.getCurrentValue(), middleX = x + size / 2f, middleY = y + size / 2f;
        RoundedUtil.drawRound(x, y, size, size, 6, false, Color.WHITE);
    }

    private Color gradientColor1 = Color.WHITE, gradientColor2 = Color.WHITE, gradientColor3 = Color.WHITE, gradientColor4 = Color.WHITE;


    @EventTarget
    private void onRender2D(EventRender2D eventRender2D) {
        GlStateManager.pushMatrix();
        GlStateManager.translate(-xCC.getCurrentValue(), -yCC.getCurrentValueInt(), 1);
        getEntities();
        dr dr = (dr) Smertnix.instance.draggableHUD.getDraggableComponentByClass(dr.class);
        float x = dr.getX(), y = dr.getY(), size = this.size.getCurrentValue(), middleX = x + size / 2f, middleY = y + size / 2f;
        //float x = yC.getCurrentValue(), y = yC.getCurrentValue(), size = this.size.getCurrentValue(), middleX = x + size / 2f, middleY = y + size / 2f;

        Color lineColor = new Color(255, 255, 255, 30);

        boolean HudMod = true;

            if (colorMode.currentMode.equals("Colored")) {
                Color onecolor = new Color(oneColor.getColorValue());
                Color twocolor = new Color(twoColor.getColorValue());
                if (ModuleList.colorList.currentMode.equals("Rainbow")) {
                    gradientColor1 = ColorUtils.rainbowCol(15, 0, 1, 5);
                    gradientColor2 = ColorUtils.rainbowCol(15, 90, 1, 5);
                    gradientColor3 = ColorUtils.rainbowCol(15, 180, 1, 5);
                    gradientColor4 = ColorUtils.rainbowCol(15, 270, 1, 5);
                } else if (ModuleList.colorList.currentMode.equals("Custom")) {
                    gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(5, 0, onecolor, twocolor);
                    gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(5, 90, onecolor, twocolor);
                    gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(5, 180, onecolor, twocolor);
                    gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(5, 270, onecolor, twocolor);
                } else if (ModuleList.colorList.currentMode.equals("Astolfo")) {
                    gradientColor1 = astolfo(15, 0, 1F, 3f);
                    gradientColor2 = astolfo(15, 90, 1F, 3f);
                    gradientColor3 = astolfo(15, 180, 1F, 3f);
                    gradientColor4 = astolfo(15, 270, 1F, 3f);
                } else if (ModuleList.colorList.currentMode.equals("Fade")) {
                    gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(15, 0, onecolor, Color.BLACK);
                    gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(15, 90, onecolor, Color.BLACK);
                    gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(15, 180, onecolor, Color.BLACK);
                    gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(15, 270, onecolor, Color.BLACK);
                }
                Color finalgradientColor1 = gradientColor1;
                Color finalgradientColor2 = gradientColor2;
                Color finalgradientColor3 = gradientColor3;
                Color finalgradientColor4 = gradientColor4;

                dr drd = (dr) Smertnix.instance.draggableHUD.getDraggableComponentByClass(dr.class);
                drd.setWidth(Radar.size.getCurrentValueInt());
                drd.setHeight(Radar.size.getCurrentValueInt());
                RenderUtils.drawBlurredShadow(drd.getX() + 1, drd.getY() + 1, drd.getWidth() - 2, drd.getHeight() - 2 - 0.5F, 15, gradientColor1);
                RoundedUtil.drawGradientRound(drd.getX(), drd.getY(), drd.getWidth(), drd.getHeight() - 0.5F, 6, ColorUtils2.applyOpacity(gradientColor4, 10.85f).brighter(), gradientColor1.brighter(), gradientColor3.brighter(), gradientColor2.brighter());
                RoundedUtil.drawGradientRound(drd.getX() + 1, drd.getY() + 1, drd.getWidth() - 2, drd.getHeight() - 2 - 0.5F, 6, ColorUtils2.applyOpacity(gradientColor4, 10.85f).darker(), gradientColor1.darker(), gradientColor3.darker(), gradientColor2.darker());

            } else if (colorMode.currentMode.equals("Dark")){
                Color onecolor = new Color(oneColor.getColorValue());
                Color twocolor = new Color(twoColor.getColorValue());
                if (ModuleList.colorList.currentMode.equals("Rainbow")) {
                    gradientColor1 = ColorUtils.rainbowCol(15, 0, 1, 5);
                    gradientColor2 = ColorUtils.rainbowCol(15, 90, 1, 5);
                    gradientColor3 = ColorUtils.rainbowCol(15, 180, 1, 5);
                    gradientColor4 = ColorUtils.rainbowCol(15, 270, 1, 5);
                } else if (ModuleList.colorList.currentMode.equals("Custom")) {
                    gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(5, 0, onecolor, twocolor);
                    gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(5, 90, onecolor, twocolor);
                    gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(5, 180, onecolor, twocolor);
                    gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(5, 270, onecolor, twocolor);
                } else if (ModuleList.colorList.currentMode.equals("Astolfo")) {
                    gradientColor1 = astolfo(15, 0, 1F, 3f);
                    gradientColor2 = astolfo(15, 90, 1F, 3f);
                    gradientColor3 = astolfo(15, 180, 1F, 3f);
                    gradientColor4 = astolfo(15, 270, 1F, 3f);
                } else if (ModuleList.colorList.currentMode.equals("Fade")) {
                    gradientColor1 = ColorUtils2.interpolateColorsBackAndForth(15, 0, onecolor, Color.BLACK);
                    gradientColor2 = ColorUtils2.interpolateColorsBackAndForth(15, 90, onecolor, Color.BLACK);
                    gradientColor3 = ColorUtils2.interpolateColorsBackAndForth(15, 180, onecolor, Color.BLACK);
                    gradientColor4 = ColorUtils2.interpolateColorsBackAndForth(15, 270, onecolor, Color.BLACK);
                }

                Color finalgradientColor1 = gradientColor1;
                Color finalgradientColor2 = gradientColor2;
                Color finalgradientColor3 = gradientColor3;
                Color finalgradientColor4 = gradientColor4;

                dr drd = (dr) Smertnix.instance.draggableHUD.getDraggableComponentByClass(dr.class);
                drd.setWidth(Radar.size.getCurrentValueInt());
                drd.setHeight(Radar.size.getCurrentValueInt());
                RenderUtils.drawBlurredShadow(drd.getX() + 1, drd.getY() + 1, drd.getWidth() - 2, drd.getHeight() - 2 - 0.5F, 15, gradientColor1);
                RoundedUtil.drawGradientRound(drd.getX(), drd.getY(), drd.getWidth(), drd.getHeight() - 0.5F, 6/*, new Color(10, 10, 10, 80), new Color(-2)*/, ColorUtils2.applyOpacity(gradientColor4, 10.85f).brighter(), gradientColor1.brighter(), gradientColor3.brighter(), gradientColor2.brighter());
                RoundedUtil.drawRound(drd.getX() + 1, drd.getY() + 1, drd.getWidth() - 2, drd.getHeight() - 2 - 0.5F, 6/*, new Color(10, 10, 10, 80), new Color(-2)*/, Color.BLACK);
            }



        {
            Gui.drawRect2(x - 1, y + (size / 2f - .5), size + 2, 1, lineColor.getRGB());
            Gui.drawRect2(x + (size / 2f - .5), y - 1, 1, size + 2, lineColor.getRGB());
        }/*else {
            Gui.drawRect2(x + 1, y + (size / 2f - .5), size - 2, 1, lineColor.getRGB());
            Gui.drawRect2(x + (size / 2f - .5), y + 1, 1, size - 2, lineColor.getRGB());
        }*/

        StencilUtil.initStencilToWrite();
        RenderUtils.renderRoundedRect(x, y, size, size, 6, -1);
        StencilUtil.readStencilBuffer(1);
        GLUtil.rotate(middleX, middleY, Minecraft.player.rotationYaw, () -> {
            for (EntityLivingBase entity : entities) {
                double xDiff = MathUtils.interpolate(entity.prevPosX, entity.posX, Minecraft.timer.renderPartialTicks) - MathUtils.interpolate(Minecraft.player.prevPosX, Minecraft.player.posX, Minecraft.timer.renderPartialTicks);
                double zDiff = MathUtils.interpolate(entity.prevPosZ, entity.posZ, Minecraft.timer.renderPartialTicks) - MathUtils.interpolate(Minecraft.player.prevPosZ, Minecraft.player.posZ, Minecraft.timer.renderPartialTicks);
                if ((xDiff + zDiff) < (size / 2f)) {
                    float translatedX = (float) (middleX - xDiff);
                    float translatedY = (float) (middleY - zDiff);
                    RoundedUtil.drawRound(translatedX, translatedY, 3, 3, 1f, new Color(255, 255, 255, 255));
                    //Gui.drawRect2(translatedX, translatedY, 3, 3, -1);
                }
            }
        });
        StencilUtil.uninitStencilBuffer();
        GlStateManager.popMatrix();
    }


    public void getEntities() {
        entities.clear();
        for (Entity entity : Minecraft.world.loadedEntityList) {
            if (entity instanceof EntityLivingBase) {
                if (entity instanceof EntityPlayer && entity != null && !entity.isInvisible()) {
                    entities.add((EntityLivingBase) entity);
                }
            }
        }
    }


    @Override
    public void onEnable() {
        super.onEnable();
    }
}
Почему в этом майнкрафте у всех настолько ущербный дизайн? Неужели нельзя сделать что-то лучше?
 
Сверху Снизу