Подпишитесь на наш Telegram-канал, чтобы всегда быть в курсе важных обновлений! Перейти

Черный полу-скид нурика | Expensive 3.1

Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
upd: сделал другой стаффлист
ss list:
Посмотреть вложение 279864

ss hud:
Посмотреть вложение 279812
Пожалуйста, авторизуйтесь для просмотра ссылки.

Пожалуйста, авторизуйтесь для просмотра ссылки.

StaffListRenderer2.java:
Expand Collapse Copy
package im.Moonlight.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import im.Moonlight.Moonlight;
import im.Moonlight.command.staffs.StaffStorage;
import im.Moonlight.events.EventDisplay;
import im.Moonlight.events.EventUpdate;
import im.Moonlight.ui.display.ElementRenderer;
import im.Moonlight.ui.display.ElementUpdater;
import im.Moonlight.ui.styles.Style;
import im.Moonlight.utils.drag.Dragging;
import im.Moonlight.utils.math.MathUtil;
import im.Moonlight.utils.render.ColorUtils;
import im.Moonlight.utils.render.DisplayUtils;
import im.Moonlight.utils.render.KawaseBlur;
import im.Moonlight.utils.render.font.Fonts;
import im.Moonlight.utils.text.GradientUtil;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.client.network.play.NetworkPlayerInfo;
import net.minecraft.scoreboard.ScorePlayerTeam;
import net.minecraft.scoreboard.Team;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.world.GameType;
import ru.hogoshi.Animation;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;
import java.util.regex.Pattern;


@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class StaffListRenderer2 implements ElementRenderer, ElementUpdater {

    private float animation;
    final Dragging dragging;
    final ResourceLocation logo = new ResourceLocation("expensive/images/hud/staff1.png");
    final float iconSize = 10;

    private final List<Staff> staffPlayers = new ArrayList<>();
    private final Pattern namePattern = Pattern.compile("^\\w{3,16}$");
    private final Pattern prefixMatches = Pattern.compile(".[I](mod|der|adm|help|wne|хелп|адм|поддержка|кура|own|taf|curat|dev|supp|yt|сотруд).[/I]");


    @Override
    public void update(EventUpdate e) {
        staffPlayers.clear();

        for (ScorePlayerTeam team : mc.world.getScoreboard().getTeams().stream().sorted(Comparator.comparing(Team::getName)).toList()) {
            String name = team.getMembershipCollection().toString().replaceAll("[\\[\\]]", "");
            boolean vanish = true;
            for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {
                if (info.getGameProfile().getName().equals(name)) {
                    vanish = false;
                }
            }
            if (namePattern.matcher(name).matches() && !name.equals(mc.player.getName().getString())) {
                if (!vanish) {
                    if (prefixMatches.matcher(team.getPrefix().getString().toLowerCase(Locale.ROOT)).matches() || StaffStorage.isStaff(name)) {
                        Staff staff = new Staff(team.getPrefix(), name, false);
                        staffPlayers.add(staff);
                    }
                }
                if (vanish && !team.getPrefix().getString().isEmpty()) {
                    Staff staff = new Staff(team.getPrefix(), name, true);
                    staffPlayers.add(staff);
                }
            }
        }
    }

    float width;
    float height;

    @Override
    public void render(EventDisplay eventDisplay) {

        float posX = dragging.getX();
        float posY = dragging.getY();
        float padding = 5;
        float fontSize = 6.5f;
        MatrixStack ms = eventDisplay.getMatrixStack();
        ITextComponent name = GradientUtil.gradient("Employees");


        Style style = Moonlight.getInstance().getStyleManager().getCurrentStyle();

        //DisplayUtils.drawShadow(posX, posY, width, height, 10, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());

        DisplayUtils.drawRoundedRect(posX, posY + 1.0f, this.animation, 18.0f, 4.0f, ColorUtils.rgba(21, 21, 21, 215));
        DisplayUtils.drawImage(logo, posX + padding, posY + padding, iconSize, iconSize, ColorUtils.rgb(255, 255, 255));
        Fonts.sfui.drawText(ms, "Employees", posX + 20, posY + padding + 1.5f,ColorUtils.rgb(255,255,255), 6.5f);

        posY += fontSize + padding * 2;

        float maxWidth = Fonts.sfMedium.getWidth(name, fontSize) + padding * 2;
        float localHeight = fontSize + padding * 2;

        //DisplayUtils.drawRectHorizontalW(posX + 0.5f, posY, width - 1, 2.5f, 3, ColorUtils.rgba(255, 255, 255, (int) (255 * 0.25f)));
        DisplayUtils.drawRectVerticalW(posX + 18.0f, posY - 13.5f, 1, 14.0f, 3, ColorUtils.rgba(255, 255, 255, (int) (255 * 0.75f)));
        posY += 3.5f;
        for (StaffListRenderer2.Staff f : staffPlayers) {

            ITextComponent prefix = f.getPrefix();
            float prefixWidth = Fonts.sfMedium.getWidth(prefix, fontSize);
            String staff = (prefix.getString().isEmpty() ? "" : " ") + f.getName();
            float nameWidth = Fonts.sfMedium.getWidth(staff, fontSize);


            float localWidth = prefixWidth + nameWidth + padding * 3;
            DisplayUtils.drawRoundedRect(posX, posY, this.animation, 12.0f, 3.0f, ColorUtils.rgba(21, 21, 21,215));
            Fonts.sfMedium.drawText(ms, prefix, posX + padding, posY + 2.5f, fontSize, 255);
            Fonts.sfMedium.drawText(ms, staff, posX + padding + prefixWidth, posY + 2.5f, ColorUtils.rgb(255,255,255), fontSize);
            //Fonts.sfMedium.drawText(ms, f.getStatus().string, posX + width - padding - Fonts.sfMedium.getWidth(f.getStatus().string, fontSize), posY, f.getStatus().color, fontSize);
            if (f.isVanished()) {
                DisplayUtils.drawCircle(posX + 4 + width - padding - fontSize / 2, posY + fontSize / 2 + 2.5f, fontSize / 2 + 2, ColorUtils.rgb(254, 68, 68));
            } else {
                DisplayUtils.drawCircle(posX + 4 + width - padding - fontSize / 2, posY + fontSize / 2 + 2.5f, fontSize / 2 + 2, ColorUtils.rgb(0, 255, 0));
            }
            if (localWidth > maxWidth) {
                maxWidth = localWidth;
            }

            posY += fontSize + padding;
            localHeight += fontSize + padding;
        }
        this.animation = MathUtil.lerp(this.animation, Math.max(maxWidth, 80.0f), 10.0f);
        this.height = localHeight + 2.5f;
        this.dragging.setWidth(this.animation);
        this.dragging.setHeight(this.height);
        width = Math.max(maxWidth, 80);
        height = localHeight + 2.5f;
        dragging.setWidth(width);
        dragging.setHeight(height);
    }

    @AllArgsConstructor
    [USER=54968]@data[/USER]
    public class Staff {
        ITextComponent prefix;
        String name;
        boolean isVanished;

        public void updateStatus() {
            for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {
                if (info.getGameProfile().getName().equals(name)) {
                    if (info.getGameType() == GameType.SPECTATOR) {
                        return;
                    }
                    isVanished = false;
                    return;
                }
            }
            isVanished = true;
        }
    }

    public enum Status {
        NONE("", -1),
        VANISHED("V", ColorUtils.rgb(254, 68, 68));
        public final String string;
        public final int color;

        Status(String string, int color) {
            this.string = string;
            this.color = color;
        }
    }

    private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

        //DisplayUtils.drawRoundedRect(x - 0.5f, y - 0.5f, width + 1, height + 1, radius + 0.5f, ColorUtils.getColor(0)); // outline
        DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 21, 21, 215));
    }
}
так сложно сделать прозрачный цвет?
 
upd: сделал другой стаффлист
ss list:
Посмотреть вложение 279864

ss hud:
Посмотреть вложение 279812
Пожалуйста, авторизуйтесь для просмотра ссылки.

Пожалуйста, авторизуйтесь для просмотра ссылки.

StaffListRenderer2.java:
Expand Collapse Copy
package im.Moonlight.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import im.Moonlight.Moonlight;
import im.Moonlight.command.staffs.StaffStorage;
import im.Moonlight.events.EventDisplay;
import im.Moonlight.events.EventUpdate;
import im.Moonlight.ui.display.ElementRenderer;
import im.Moonlight.ui.display.ElementUpdater;
import im.Moonlight.ui.styles.Style;
import im.Moonlight.utils.drag.Dragging;
import im.Moonlight.utils.math.MathUtil;
import im.Moonlight.utils.render.ColorUtils;
import im.Moonlight.utils.render.DisplayUtils;
import im.Moonlight.utils.render.KawaseBlur;
import im.Moonlight.utils.render.font.Fonts;
import im.Moonlight.utils.text.GradientUtil;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.client.network.play.NetworkPlayerInfo;
import net.minecraft.scoreboard.ScorePlayerTeam;
import net.minecraft.scoreboard.Team;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.world.GameType;
import ru.hogoshi.Animation;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;
import java.util.regex.Pattern;


@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class StaffListRenderer2 implements ElementRenderer, ElementUpdater {

    private float animation;
    final Dragging dragging;
    final ResourceLocation logo = new ResourceLocation("expensive/images/hud/staff1.png");
    final float iconSize = 10;

    private final List<Staff> staffPlayers = new ArrayList<>();
    private final Pattern namePattern = Pattern.compile("^\\w{3,16}$");
    private final Pattern prefixMatches = Pattern.compile(".[I](mod|der|adm|help|wne|хелп|адм|поддержка|кура|own|taf|curat|dev|supp|yt|сотруд).[/I]");


    @Override
    public void update(EventUpdate e) {
        staffPlayers.clear();

        for (ScorePlayerTeam team : mc.world.getScoreboard().getTeams().stream().sorted(Comparator.comparing(Team::getName)).toList()) {
            String name = team.getMembershipCollection().toString().replaceAll("[\\[\\]]", "");
            boolean vanish = true;
            for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {
                if (info.getGameProfile().getName().equals(name)) {
                    vanish = false;
                }
            }
            if (namePattern.matcher(name).matches() && !name.equals(mc.player.getName().getString())) {
                if (!vanish) {
                    if (prefixMatches.matcher(team.getPrefix().getString().toLowerCase(Locale.ROOT)).matches() || StaffStorage.isStaff(name)) {
                        Staff staff = new Staff(team.getPrefix(), name, false);
                        staffPlayers.add(staff);
                    }
                }
                if (vanish && !team.getPrefix().getString().isEmpty()) {
                    Staff staff = new Staff(team.getPrefix(), name, true);
                    staffPlayers.add(staff);
                }
            }
        }
    }

    float width;
    float height;

    @Override
    public void render(EventDisplay eventDisplay) {

        float posX = dragging.getX();
        float posY = dragging.getY();
        float padding = 5;
        float fontSize = 6.5f;
        MatrixStack ms = eventDisplay.getMatrixStack();
        ITextComponent name = GradientUtil.gradient("Employees");


        Style style = Moonlight.getInstance().getStyleManager().getCurrentStyle();

        //DisplayUtils.drawShadow(posX, posY, width, height, 10, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());

        DisplayUtils.drawRoundedRect(posX, posY + 1.0f, this.animation, 18.0f, 4.0f, ColorUtils.rgba(21, 21, 21, 215));
        DisplayUtils.drawImage(logo, posX + padding, posY + padding, iconSize, iconSize, ColorUtils.rgb(255, 255, 255));
        Fonts.sfui.drawText(ms, "Employees", posX + 20, posY + padding + 1.5f,ColorUtils.rgb(255,255,255), 6.5f);

        posY += fontSize + padding * 2;

        float maxWidth = Fonts.sfMedium.getWidth(name, fontSize) + padding * 2;
        float localHeight = fontSize + padding * 2;

        //DisplayUtils.drawRectHorizontalW(posX + 0.5f, posY, width - 1, 2.5f, 3, ColorUtils.rgba(255, 255, 255, (int) (255 * 0.25f)));
        DisplayUtils.drawRectVerticalW(posX + 18.0f, posY - 13.5f, 1, 14.0f, 3, ColorUtils.rgba(255, 255, 255, (int) (255 * 0.75f)));
        posY += 3.5f;
        for (StaffListRenderer2.Staff f : staffPlayers) {

            ITextComponent prefix = f.getPrefix();
            float prefixWidth = Fonts.sfMedium.getWidth(prefix, fontSize);
            String staff = (prefix.getString().isEmpty() ? "" : " ") + f.getName();
            float nameWidth = Fonts.sfMedium.getWidth(staff, fontSize);


            float localWidth = prefixWidth + nameWidth + padding * 3;
            DisplayUtils.drawRoundedRect(posX, posY, this.animation, 12.0f, 3.0f, ColorUtils.rgba(21, 21, 21,215));
            Fonts.sfMedium.drawText(ms, prefix, posX + padding, posY + 2.5f, fontSize, 255);
            Fonts.sfMedium.drawText(ms, staff, posX + padding + prefixWidth, posY + 2.5f, ColorUtils.rgb(255,255,255), fontSize);
            //Fonts.sfMedium.drawText(ms, f.getStatus().string, posX + width - padding - Fonts.sfMedium.getWidth(f.getStatus().string, fontSize), posY, f.getStatus().color, fontSize);
            if (f.isVanished()) {
                DisplayUtils.drawCircle(posX + 4 + width - padding - fontSize / 2, posY + fontSize / 2 + 2.5f, fontSize / 2 + 2, ColorUtils.rgb(254, 68, 68));
            } else {
                DisplayUtils.drawCircle(posX + 4 + width - padding - fontSize / 2, posY + fontSize / 2 + 2.5f, fontSize / 2 + 2, ColorUtils.rgb(0, 255, 0));
            }
            if (localWidth > maxWidth) {
                maxWidth = localWidth;
            }

            posY += fontSize + padding;
            localHeight += fontSize + padding;
        }
        this.animation = MathUtil.lerp(this.animation, Math.max(maxWidth, 80.0f), 10.0f);
        this.height = localHeight + 2.5f;
        this.dragging.setWidth(this.animation);
        this.dragging.setHeight(this.height);
        width = Math.max(maxWidth, 80);
        height = localHeight + 2.5f;
        dragging.setWidth(width);
        dragging.setHeight(height);
    }

    @AllArgsConstructor
    [USER=54968]@data[/USER]
    public class Staff {
        ITextComponent prefix;
        String name;
        boolean isVanished;

        public void updateStatus() {
            for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {
                if (info.getGameProfile().getName().equals(name)) {
                    if (info.getGameType() == GameType.SPECTATOR) {
                        return;
                    }
                    isVanished = false;
                    return;
                }
            }
            isVanished = true;
        }
    }

    public enum Status {
        NONE("", -1),
        VANISHED("V", ColorUtils.rgb(254, 68, 68));
        public final String string;
        public final int color;

        Status(String string, int color) {
            this.string = string;
            this.color = color;
        }
    }

    private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

        //DisplayUtils.drawRoundedRect(x - 0.5f, y - 0.5f, width + 1, height + 1, radius + 0.5f, ColorUtils.getColor(0)); // outline
        DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 21, 21, 215));
    }
}
у вас типо хобби делать так?
DisplayUtils.drawRectVerticalW
upd: сделал другой стаффлист
ss list:
Посмотреть вложение 279864

ss hud:
Посмотреть вложение 279812
Пожалуйста, авторизуйтесь для просмотра ссылки.

Пожалуйста, авторизуйтесь для просмотра ссылки.

StaffListRenderer2.java:
Expand Collapse Copy
package im.Moonlight.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import im.Moonlight.Moonlight;
import im.Moonlight.command.staffs.StaffStorage;
import im.Moonlight.events.EventDisplay;
import im.Moonlight.events.EventUpdate;
import im.Moonlight.ui.display.ElementRenderer;
import im.Moonlight.ui.display.ElementUpdater;
import im.Moonlight.ui.styles.Style;
import im.Moonlight.utils.drag.Dragging;
import im.Moonlight.utils.math.MathUtil;
import im.Moonlight.utils.render.ColorUtils;
import im.Moonlight.utils.render.DisplayUtils;
import im.Moonlight.utils.render.KawaseBlur;
import im.Moonlight.utils.render.font.Fonts;
import im.Moonlight.utils.text.GradientUtil;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.client.network.play.NetworkPlayerInfo;
import net.minecraft.scoreboard.ScorePlayerTeam;
import net.minecraft.scoreboard.Team;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.world.GameType;
import ru.hogoshi.Animation;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;
import java.util.regex.Pattern;


@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class StaffListRenderer2 implements ElementRenderer, ElementUpdater {

    private float animation;
    final Dragging dragging;
    final ResourceLocation logo = new ResourceLocation("expensive/images/hud/staff1.png");
    final float iconSize = 10;

    private final List<Staff> staffPlayers = new ArrayList<>();
    private final Pattern namePattern = Pattern.compile("^\\w{3,16}$");
    private final Pattern prefixMatches = Pattern.compile(".[I](mod|der|adm|help|wne|хелп|адм|поддержка|кура|own|taf|curat|dev|supp|yt|сотруд).[/I]");


    @Override
    public void update(EventUpdate e) {
        staffPlayers.clear();

        for (ScorePlayerTeam team : mc.world.getScoreboard().getTeams().stream().sorted(Comparator.comparing(Team::getName)).toList()) {
            String name = team.getMembershipCollection().toString().replaceAll("[\\[\\]]", "");
            boolean vanish = true;
            for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {
                if (info.getGameProfile().getName().equals(name)) {
                    vanish = false;
                }
            }
            if (namePattern.matcher(name).matches() && !name.equals(mc.player.getName().getString())) {
                if (!vanish) {
                    if (prefixMatches.matcher(team.getPrefix().getString().toLowerCase(Locale.ROOT)).matches() || StaffStorage.isStaff(name)) {
                        Staff staff = new Staff(team.getPrefix(), name, false);
                        staffPlayers.add(staff);
                    }
                }
                if (vanish && !team.getPrefix().getString().isEmpty()) {
                    Staff staff = new Staff(team.getPrefix(), name, true);
                    staffPlayers.add(staff);
                }
            }
        }
    }

    float width;
    float height;

    @Override
    public void render(EventDisplay eventDisplay) {

        float posX = dragging.getX();
        float posY = dragging.getY();
        float padding = 5;
        float fontSize = 6.5f;
        MatrixStack ms = eventDisplay.getMatrixStack();
        ITextComponent name = GradientUtil.gradient("Employees");


        Style style = Moonlight.getInstance().getStyleManager().getCurrentStyle();

        //DisplayUtils.drawShadow(posX, posY, width, height, 10, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());

        DisplayUtils.drawRoundedRect(posX, posY + 1.0f, this.animation, 18.0f, 4.0f, ColorUtils.rgba(21, 21, 21, 215));
        DisplayUtils.drawImage(logo, posX + padding, posY + padding, iconSize, iconSize, ColorUtils.rgb(255, 255, 255));
        Fonts.sfui.drawText(ms, "Employees", posX + 20, posY + padding + 1.5f,ColorUtils.rgb(255,255,255), 6.5f);

        posY += fontSize + padding * 2;

        float maxWidth = Fonts.sfMedium.getWidth(name, fontSize) + padding * 2;
        float localHeight = fontSize + padding * 2;

        //DisplayUtils.drawRectHorizontalW(posX + 0.5f, posY, width - 1, 2.5f, 3, ColorUtils.rgba(255, 255, 255, (int) (255 * 0.25f)));
        DisplayUtils.drawRectVerticalW(posX + 18.0f, posY - 13.5f, 1, 14.0f, 3, ColorUtils.rgba(255, 255, 255, (int) (255 * 0.75f)));
        posY += 3.5f;
        for (StaffListRenderer2.Staff f : staffPlayers) {

            ITextComponent prefix = f.getPrefix();
            float prefixWidth = Fonts.sfMedium.getWidth(prefix, fontSize);
            String staff = (prefix.getString().isEmpty() ? "" : " ") + f.getName();
            float nameWidth = Fonts.sfMedium.getWidth(staff, fontSize);


            float localWidth = prefixWidth + nameWidth + padding * 3;
            DisplayUtils.drawRoundedRect(posX, posY, this.animation, 12.0f, 3.0f, ColorUtils.rgba(21, 21, 21,215));
            Fonts.sfMedium.drawText(ms, prefix, posX + padding, posY + 2.5f, fontSize, 255);
            Fonts.sfMedium.drawText(ms, staff, posX + padding + prefixWidth, posY + 2.5f, ColorUtils.rgb(255,255,255), fontSize);
            //Fonts.sfMedium.drawText(ms, f.getStatus().string, posX + width - padding - Fonts.sfMedium.getWidth(f.getStatus().string, fontSize), posY, f.getStatus().color, fontSize);
            if (f.isVanished()) {
                DisplayUtils.drawCircle(posX + 4 + width - padding - fontSize / 2, posY + fontSize / 2 + 2.5f, fontSize / 2 + 2, ColorUtils.rgb(254, 68, 68));
            } else {
                DisplayUtils.drawCircle(posX + 4 + width - padding - fontSize / 2, posY + fontSize / 2 + 2.5f, fontSize / 2 + 2, ColorUtils.rgb(0, 255, 0));
            }
            if (localWidth > maxWidth) {
                maxWidth = localWidth;
            }

            posY += fontSize + padding;
            localHeight += fontSize + padding;
        }
        this.animation = MathUtil.lerp(this.animation, Math.max(maxWidth, 80.0f), 10.0f);
        this.height = localHeight + 2.5f;
        this.dragging.setWidth(this.animation);
        this.dragging.setHeight(this.height);
        width = Math.max(maxWidth, 80);
        height = localHeight + 2.5f;
        dragging.setWidth(width);
        dragging.setHeight(height);
    }

    @AllArgsConstructor
    [USER=54968]@data[/USER]
    public class Staff {
        ITextComponent prefix;
        String name;
        boolean isVanished;

        public void updateStatus() {
            for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {
                if (info.getGameProfile().getName().equals(name)) {
                    if (info.getGameType() == GameType.SPECTATOR) {
                        return;
                    }
                    isVanished = false;
                    return;
                }
            }
            isVanished = true;
        }
    }

    public enum Status {
        NONE("", -1),
        VANISHED("V", ColorUtils.rgb(254, 68, 68));
        public final String string;
        public final int color;

        Status(String string, int color) {
            this.string = string;
            this.color = color;
        }
    }

    private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

        //DisplayUtils.drawRoundedRect(x - 0.5f, y - 0.5f, width + 1, height + 1, radius + 0.5f, ColorUtils.getColor(0)); // outline
        DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 21, 21, 215));
    }
}
1719165152884.png

nuh uh?
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.

Пожалуйста, зарегистрируйтесь или авторизуйтесь, чтобы увидеть содержимое.

ты про что?

Пожалуйста, зарегистрируйтесь или авторизуйтесь, чтобы увидеть содержимое.

145 строка брат, замени ее на просто @ Data без пробела

Пожалуйста, зарегистрируйтесь или авторизуйтесь, чтобы увидеть содержимое.

Пожалуйста, авторизуйтесь для просмотра ссылки.
 
matvey183r4 Помоги с Hud он у меня вообще не показываеться в render :forsenGun::FeelsBadMan:
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Запастил
 
Другой шрифт и пробел бы сделать, было бы заебись
А так под пиво сойдёт.
 
помогите исправить пару ошибок со ArrayListRenderer2
 

Пожалуйста, зарегистрируйтесь или авторизуйтесь, чтобы увидеть содержимое.


Да уже в wuq client(noad) лучше худ скид нурика
он хуже наоборот, там единсвенное иконки с нурика, а так вообще написи по центру, нету полосок , кароче у тебя вкуса нету как минимум а то посмотря на твою переделку моих визуалов я чуть не обрыгался нахуй
 
Скрытое содержимое

он хуже наоборот, там единсвенное иконки с нурика, а так вообще написи по центру, нету полосок , кароче у тебя вкуса нету как минимум а то посмотря на твою переделку моих визуалов я чуть не обрыгался нахуй
я всего цвет поменял
 
upd: сделал другой стаффлист
ss list:
Посмотреть вложение 279864

ss hud:
Посмотреть вложение 279812
Пожалуйста, авторизуйтесь для просмотра ссылки.

Пожалуйста, авторизуйтесь для просмотра ссылки.

StaffListRenderer2.java:
Expand Collapse Copy
package im.Moonlight.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import im.Moonlight.Moonlight;
import im.Moonlight.command.staffs.StaffStorage;
import im.Moonlight.events.EventDisplay;
import im.Moonlight.events.EventUpdate;
import im.Moonlight.ui.display.ElementRenderer;
import im.Moonlight.ui.display.ElementUpdater;
import im.Moonlight.ui.styles.Style;
import im.Moonlight.utils.drag.Dragging;
import im.Moonlight.utils.math.MathUtil;
import im.Moonlight.utils.render.ColorUtils;
import im.Moonlight.utils.render.DisplayUtils;
import im.Moonlight.utils.render.KawaseBlur;
import im.Moonlight.utils.render.font.Fonts;
import im.Moonlight.utils.text.GradientUtil;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.client.network.play.NetworkPlayerInfo;
import net.minecraft.scoreboard.ScorePlayerTeam;
import net.minecraft.scoreboard.Team;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.world.GameType;
import ru.hogoshi.Animation;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;
import java.util.regex.Pattern;


@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class StaffListRenderer2 implements ElementRenderer, ElementUpdater {

    private float animation;
    final Dragging dragging;
    final ResourceLocation logo = new ResourceLocation("expensive/images/hud/staff1.png");
    final float iconSize = 10;

    private final List<Staff> staffPlayers = new ArrayList<>();
    private final Pattern namePattern = Pattern.compile("^\\w{3,16}$");
    private final Pattern prefixMatches = Pattern.compile(".[I](mod|der|adm|help|wne|хелп|адм|поддержка|кура|own|taf|curat|dev|supp|yt|сотруд).[/I]");


    @Override
    public void update(EventUpdate e) {
        staffPlayers.clear();

        for (ScorePlayerTeam team : mc.world.getScoreboard().getTeams().stream().sorted(Comparator.comparing(Team::getName)).toList()) {
            String name = team.getMembershipCollection().toString().replaceAll("[\\[\\]]", "");
            boolean vanish = true;
            for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {
                if (info.getGameProfile().getName().equals(name)) {
                    vanish = false;
                }
            }
            if (namePattern.matcher(name).matches() && !name.equals(mc.player.getName().getString())) {
                if (!vanish) {
                    if (prefixMatches.matcher(team.getPrefix().getString().toLowerCase(Locale.ROOT)).matches() || StaffStorage.isStaff(name)) {
                        Staff staff = new Staff(team.getPrefix(), name, false);
                        staffPlayers.add(staff);
                    }
                }
                if (vanish && !team.getPrefix().getString().isEmpty()) {
                    Staff staff = new Staff(team.getPrefix(), name, true);
                    staffPlayers.add(staff);
                }
            }
        }
    }

    float width;
    float height;

    @Override
    public void render(EventDisplay eventDisplay) {

        float posX = dragging.getX();
        float posY = dragging.getY();
        float padding = 5;
        float fontSize = 6.5f;
        MatrixStack ms = eventDisplay.getMatrixStack();
        ITextComponent name = GradientUtil.gradient("Employees");


        Style style = Moonlight.getInstance().getStyleManager().getCurrentStyle();

        //DisplayUtils.drawShadow(posX, posY, width, height, 10, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());

        DisplayUtils.drawRoundedRect(posX, posY + 1.0f, this.animation, 18.0f, 4.0f, ColorUtils.rgba(21, 21, 21, 215));
        DisplayUtils.drawImage(logo, posX + padding, posY + padding, iconSize, iconSize, ColorUtils.rgb(255, 255, 255));
        Fonts.sfui.drawText(ms, "Employees", posX + 20, posY + padding + 1.5f,ColorUtils.rgb(255,255,255), 6.5f);

        posY += fontSize + padding * 2;

        float maxWidth = Fonts.sfMedium.getWidth(name, fontSize) + padding * 2;
        float localHeight = fontSize + padding * 2;

        //DisplayUtils.drawRectHorizontalW(posX + 0.5f, posY, width - 1, 2.5f, 3, ColorUtils.rgba(255, 255, 255, (int) (255 * 0.25f)));
        DisplayUtils.drawRectVerticalW(posX + 18.0f, posY - 13.5f, 1, 14.0f, 3, ColorUtils.rgba(255, 255, 255, (int) (255 * 0.75f)));
        posY += 3.5f;
        for (StaffListRenderer2.Staff f : staffPlayers) {

            ITextComponent prefix = f.getPrefix();
            float prefixWidth = Fonts.sfMedium.getWidth(prefix, fontSize);
            String staff = (prefix.getString().isEmpty() ? "" : " ") + f.getName();
            float nameWidth = Fonts.sfMedium.getWidth(staff, fontSize);


            float localWidth = prefixWidth + nameWidth + padding * 3;
            DisplayUtils.drawRoundedRect(posX, posY, this.animation, 12.0f, 3.0f, ColorUtils.rgba(21, 21, 21,215));
            Fonts.sfMedium.drawText(ms, prefix, posX + padding, posY + 2.5f, fontSize, 255);
            Fonts.sfMedium.drawText(ms, staff, posX + padding + prefixWidth, posY + 2.5f, ColorUtils.rgb(255,255,255), fontSize);
            //Fonts.sfMedium.drawText(ms, f.getStatus().string, posX + width - padding - Fonts.sfMedium.getWidth(f.getStatus().string, fontSize), posY, f.getStatus().color, fontSize);
            if (f.isVanished()) {
                DisplayUtils.drawCircle(posX + 4 + width - padding - fontSize / 2, posY + fontSize / 2 + 2.5f, fontSize / 2 + 2, ColorUtils.rgb(254, 68, 68));
            } else {
                DisplayUtils.drawCircle(posX + 4 + width - padding - fontSize / 2, posY + fontSize / 2 + 2.5f, fontSize / 2 + 2, ColorUtils.rgb(0, 255, 0));
            }
            if (localWidth > maxWidth) {
                maxWidth = localWidth;
            }

            posY += fontSize + padding;
            localHeight += fontSize + padding;
        }
        this.animation = MathUtil.lerp(this.animation, Math.max(maxWidth, 80.0f), 10.0f);
        this.height = localHeight + 2.5f;
        this.dragging.setWidth(this.animation);
        this.dragging.setHeight(this.height);
        width = Math.max(maxWidth, 80);
        height = localHeight + 2.5f;
        dragging.setWidth(width);
        dragging.setHeight(height);
    }

    @AllArgsConstructor
    [USER=54968]@data[/USER]
    public class Staff {
        ITextComponent prefix;
        String name;
        boolean isVanished;

        public void updateStatus() {
            for (NetworkPlayerInfo info : mc.getConnection().getPlayerInfoMap()) {
                if (info.getGameProfile().getName().equals(name)) {
                    if (info.getGameType() == GameType.SPECTATOR) {
                        return;
                    }
                    isVanished = false;
                    return;
                }
            }
            isVanished = true;
        }
    }

    public enum Status {
        NONE("", -1),
        VANISHED("V", ColorUtils.rgb(254, 68, 68));
        public final String string;
        public final int color;

        Status(String string, int color) {
            this.string = string;
            this.color = color;
        }
    }

    private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

        //DisplayUtils.drawRoundedRect(x - 0.5f, y - 0.5f, width + 1, height + 1, radius + 0.5f, ColorUtils.getColor(0)); // outline
        DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(21, 21, 21, 215));
    }
}
как пофиксить ету ошибку? java: illegal start of type ето где public final Dragging dragging;
 
Назад
Сверху Снизу