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

Вопрос InfoWindows - 3.1

Read Only
Read Only
Статус
Оффлайн
Регистрация
14 Май 2025
Сообщения
436
Реакции
4
вот кодик думаю сойдед вам


Кодик:
Expand Collapse Copy
package vm.protect.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import vm.protect.events.EventKey;
import vm.protect.functions.api.Category;
import vm.protect.functions.api.Function;
import vm.protect.functions.api.FunctionRegister;
import vm.protect.functions.settings.impl.BindSetting;
import vm.protect.utils.render.ColorUtils;
import vm.protect.utils.render.font.Fonts;

@FunctionRegister(name = "InfoWindow", description = "Открывает окно с информацией", type = Category.Misc)
public class InfoWindow extends Function {
    public BindSetting bind = new BindSetting("Open Info", 0);

    public InfoWindow() {
        this.addSettings(this.bind);
    }

    [USER=1474073]@Subscribe[/USER]
    private void onKey(EventKey e) {
        if (e.getKey() == this.bind.get())
            Minecraft.getInstance().displayGuiScreen(new AboutGui());
    }

    private static class AboutGui extends Screen {
        private final Minecraft mc = Minecraft.getInstance();

        protected AboutGui() {
            super(new StringTextComponent("About"));
        }

        [USER=1367676]@override[/USER]
        public void render(MatrixStack ms, int mouseX, int mouseY, float partialTicks) {
            int width = 360, height = 260;
            int x = (this.width - width) / 2;
            int y = (this.height - height) / 2;
            int radius = 16;

            drawShadowedRoundedRect(ms, x, y, width, height, radius, 0xFF121212, 0xCC000000);

            int centerX = this.width / 2;

            int textStartX = x + 28;
            int textStartY = y + 60;
            int lineHeight = 28;

            drawLabelAndField(ms, "Имя игрока:", mc.getSession().getUsername(), textStartX, textStartY, width - 56, 24);
            drawLabelAndField(ms, "Версия игры:", mc.getVersion(), textStartX, textStartY + lineHeight * 1, width - 56, 24);
            drawLabelAndField(ms, "Кодер:", "Herduka + regu11ar", textStartX, textStartY + lineHeight * 2, width - 56, 24);
            drawLabelAndField(ms, "Тип защиты:", "VMProtect + InternalGuard", textStartX, textStartY + lineHeight * 3, width - 56, 24);
            drawLabelAndField(ms, "Год выпуска:", "2025", textStartX, textStartY + lineHeight * 4, width - 56, 24);

            String copyright = "© NightWarr 2025 Все права защищены";
            int copyrightWidth = mc.fontRenderer.getStringWidth(copyright);
            Fonts.sfbold.drawText(ms, copyright, centerX - copyrightWidth / 2, y + height - 36, 0xFFAAAAAA, 8);
        }

        private void drawLabelAndField(MatrixStack ms, String label, String value, int x, int y, int width, int height) {
            Fonts.sfbold.drawText(ms, label, x, y + 8, 0xFFFFFFFF, 10);

            int labelWidth = mc.fontRenderer.getStringWidth(label) + 12;
            int fieldX = x + labelWidth;
            int fieldWidth = width - labelWidth;

            drawGradientRoundedRect(ms, fieldX, y, fieldWidth, height, 8, 0xFF2A2A2A, 0xFF1A1A1A);

            Fonts.sfbold.drawText(ms, value, fieldX + 8, y + 8, 0xFFE0E0E0, 10);
        }

        private void drawRoundedRect(MatrixStack ms, int x, int y, int width, int height, int radius, int color) {
            AbstractGui.fill(ms, x + radius, y, x + width - radius, y + height, color);
            AbstractGui.fill(ms, x, y + radius, x + width, y + height - radius, color);

            fillCircle(ms, x + radius, y + radius, radius, color);
            fillCircle(ms, x + width - radius - 1, y + radius, radius, color);
            fillCircle(ms, x + radius, y + height - radius - 1, radius, color);
            fillCircle(ms, x + width - radius - 1, y + height - radius - 1, radius, color);
        }

        private void drawGradientRoundedRect(MatrixStack ms, int x, int y, int width, int height, int radius, int startColor, int endColor) {
            for (int i = 0; i < height; i++) {
                int color = ColorUtils.lerpColor(startColor, endColor, (float) i / height);
                AbstractGui.fill(ms, x + radius, y + i, x + width - radius, y + i + 1, color);
                for (int dx = 0; dx < radius; dx++) {
                    int alpha = (int) (ColorUtils.alpha(color) * (Math.sqrt(radius * radius - dx * dx) / radius));
                    int edgeColor = (color & 0x00FFFFFF) | (alpha << 24);
                    AbstractGui.fill(ms, x + dx, y + i, x + dx + 1, y + i + 1, edgeColor);
                    AbstractGui.fill(ms, x + width - dx - 1, y + i, x + width - dx, y + i + 1, edgeColor);
                }
            }
        }

        private void drawShadowedRoundedRect(MatrixStack ms, int x, int y, int width, int height, int radius, int bgColor, int shadowColor) {
            int shadowOffset = 4;
            drawRoundedRect(ms, x + shadowOffset, y + shadowOffset, width, height, radius, shadowColor);
            drawRoundedRect(ms, x, y, width, height, radius, bgColor);
        }

        private void fillCircle(MatrixStack ms, int cx, int cy, int radius, int color) {
            for (int dy = -radius; dy <= radius; dy++) {
                int dxLimit = (int) Math.sqrt(radius * radius - dy * dy);
                AbstractGui.fill(ms, cx - dxLimit, cy + dy, cx + dxLimit + 1, cy + dy + 1, color);
            }
        }

        [USER=1367676]@override[/USER]
        public boolean mouseClicked(double mouseX, double mouseY, int button) {
            int width = 360, height = 260;
            int x = (this.width - width) / 2;
            int y = (this.height - height) / 2;
            int centerX = this.width / 2;
            int closeBtnY = y + height - 30;
            int closeBtnWidth = 80;
            int closeBtnHeight = 20;

            if (mouseX >= centerX - closeBtnWidth / 2 && mouseX <= centerX + closeBtnWidth / 2
                    && mouseY >= closeBtnY && mouseY <= closeBtnY + closeBtnHeight) {
                this.minecraft.displayGuiScreen(null);
                return true;
            }
            return super.mouseClicked(mouseX, mouseY, button);
        }

        [USER=1367676]@override[/USER]
        public boolean isPauseScreen() {
            return false;
        }
    }
}
SS
1749898734305.png
 
вот кодик думаю сойдед вам


Кодик:
Expand Collapse Copy
package vm.protect.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import vm.protect.events.EventKey;
import vm.protect.functions.api.Category;
import vm.protect.functions.api.Function;
import vm.protect.functions.api.FunctionRegister;
import vm.protect.functions.settings.impl.BindSetting;
import vm.protect.utils.render.ColorUtils;
import vm.protect.utils.render.font.Fonts;

@FunctionRegister(name = "InfoWindow", description = "Открывает окно с информацией", type = Category.Misc)
public class InfoWindow extends Function {
    public BindSetting bind = new BindSetting("Open Info", 0);

    public InfoWindow() {
        this.addSettings(this.bind);
    }

    [USER=1474073]@Subscribe[/USER]
    private void onKey(EventKey e) {
        if (e.getKey() == this.bind.get())
            Minecraft.getInstance().displayGuiScreen(new AboutGui());
    }

    private static class AboutGui extends Screen {
        private final Minecraft mc = Minecraft.getInstance();

        protected AboutGui() {
            super(new StringTextComponent("About"));
        }

        [USER=1367676]@override[/USER]
        public void render(MatrixStack ms, int mouseX, int mouseY, float partialTicks) {
            int width = 360, height = 260;
            int x = (this.width - width) / 2;
            int y = (this.height - height) / 2;
            int radius = 16;

            drawShadowedRoundedRect(ms, x, y, width, height, radius, 0xFF121212, 0xCC000000);

            int centerX = this.width / 2;

            int textStartX = x + 28;
            int textStartY = y + 60;
            int lineHeight = 28;

            drawLabelAndField(ms, "Имя игрока:", mc.getSession().getUsername(), textStartX, textStartY, width - 56, 24);
            drawLabelAndField(ms, "Версия игры:", mc.getVersion(), textStartX, textStartY + lineHeight * 1, width - 56, 24);
            drawLabelAndField(ms, "Кодер:", "Herduka + regu11ar", textStartX, textStartY + lineHeight * 2, width - 56, 24);
            drawLabelAndField(ms, "Тип защиты:", "VMProtect + InternalGuard", textStartX, textStartY + lineHeight * 3, width - 56, 24);
            drawLabelAndField(ms, "Год выпуска:", "2025", textStartX, textStartY + lineHeight * 4, width - 56, 24);

            String copyright = "© NightWarr 2025 Все права защищены";
            int copyrightWidth = mc.fontRenderer.getStringWidth(copyright);
            Fonts.sfbold.drawText(ms, copyright, centerX - copyrightWidth / 2, y + height - 36, 0xFFAAAAAA, 8);
        }

        private void drawLabelAndField(MatrixStack ms, String label, String value, int x, int y, int width, int height) {
            Fonts.sfbold.drawText(ms, label, x, y + 8, 0xFFFFFFFF, 10);

            int labelWidth = mc.fontRenderer.getStringWidth(label) + 12;
            int fieldX = x + labelWidth;
            int fieldWidth = width - labelWidth;

            drawGradientRoundedRect(ms, fieldX, y, fieldWidth, height, 8, 0xFF2A2A2A, 0xFF1A1A1A);

            Fonts.sfbold.drawText(ms, value, fieldX + 8, y + 8, 0xFFE0E0E0, 10);
        }

        private void drawRoundedRect(MatrixStack ms, int x, int y, int width, int height, int radius, int color) {
            AbstractGui.fill(ms, x + radius, y, x + width - radius, y + height, color);
            AbstractGui.fill(ms, x, y + radius, x + width, y + height - radius, color);

            fillCircle(ms, x + radius, y + radius, radius, color);
            fillCircle(ms, x + width - radius - 1, y + radius, radius, color);
            fillCircle(ms, x + radius, y + height - radius - 1, radius, color);
            fillCircle(ms, x + width - radius - 1, y + height - radius - 1, radius, color);
        }

        private void drawGradientRoundedRect(MatrixStack ms, int x, int y, int width, int height, int radius, int startColor, int endColor) {
            for (int i = 0; i < height; i++) {
                int color = ColorUtils.lerpColor(startColor, endColor, (float) i / height);
                AbstractGui.fill(ms, x + radius, y + i, x + width - radius, y + i + 1, color);
                for (int dx = 0; dx < radius; dx++) {
                    int alpha = (int) (ColorUtils.alpha(color) * (Math.sqrt(radius * radius - dx * dx) / radius));
                    int edgeColor = (color & 0x00FFFFFF) | (alpha << 24);
                    AbstractGui.fill(ms, x + dx, y + i, x + dx + 1, y + i + 1, edgeColor);
                    AbstractGui.fill(ms, x + width - dx - 1, y + i, x + width - dx, y + i + 1, edgeColor);
                }
            }
        }

        private void drawShadowedRoundedRect(MatrixStack ms, int x, int y, int width, int height, int radius, int bgColor, int shadowColor) {
            int shadowOffset = 4;
            drawRoundedRect(ms, x + shadowOffset, y + shadowOffset, width, height, radius, shadowColor);
            drawRoundedRect(ms, x, y, width, height, radius, bgColor);
        }

        private void fillCircle(MatrixStack ms, int cx, int cy, int radius, int color) {
            for (int dy = -radius; dy <= radius; dy++) {
                int dxLimit = (int) Math.sqrt(radius * radius - dy * dy);
                AbstractGui.fill(ms, cx - dxLimit, cy + dy, cx + dxLimit + 1, cy + dy + 1, color);
            }
        }

        [USER=1367676]@override[/USER]
        public boolean mouseClicked(double mouseX, double mouseY, int button) {
            int width = 360, height = 260;
            int x = (this.width - width) / 2;
            int y = (this.height - height) / 2;
            int centerX = this.width / 2;
            int closeBtnY = y + height - 30;
            int closeBtnWidth = 80;
            int closeBtnHeight = 20;

            if (mouseX >= centerX - closeBtnWidth / 2 && mouseX <= centerX + closeBtnWidth / 2
                    && mouseY >= closeBtnY && mouseY <= closeBtnY + closeBtnHeight) {
                this.minecraft.displayGuiScreen(null);
                return true;
            }
            return super.mouseClicked(mouseX, mouseY, button);
        }

        [USER=1367676]@override[/USER]
        public boolean isPauseScreen() {
            return false;
        }
    }
}
SS
Посмотреть вложение 308847
это пиздец реальный
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
вот кодик думаю сойдед вам


Кодик:
Expand Collapse Copy
package vm.protect.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import vm.protect.events.EventKey;
import vm.protect.functions.api.Category;
import vm.protect.functions.api.Function;
import vm.protect.functions.api.FunctionRegister;
import vm.protect.functions.settings.impl.BindSetting;
import vm.protect.utils.render.ColorUtils;
import vm.protect.utils.render.font.Fonts;

@FunctionRegister(name = "InfoWindow", description = "Открывает окно с информацией", type = Category.Misc)
public class InfoWindow extends Function {
    public BindSetting bind = new BindSetting("Open Info", 0);

    public InfoWindow() {
        this.addSettings(this.bind);
    }

    [USER=1474073]@Subscribe[/USER]
    private void onKey(EventKey e) {
        if (e.getKey() == this.bind.get())
            Minecraft.getInstance().displayGuiScreen(new AboutGui());
    }

    private static class AboutGui extends Screen {
        private final Minecraft mc = Minecraft.getInstance();

        protected AboutGui() {
            super(new StringTextComponent("About"));
        }

        [USER=1367676]@override[/USER]
        public void render(MatrixStack ms, int mouseX, int mouseY, float partialTicks) {
            int width = 360, height = 260;
            int x = (this.width - width) / 2;
            int y = (this.height - height) / 2;
            int radius = 16;

            drawShadowedRoundedRect(ms, x, y, width, height, radius, 0xFF121212, 0xCC000000);

            int centerX = this.width / 2;

            int textStartX = x + 28;
            int textStartY = y + 60;
            int lineHeight = 28;

            drawLabelAndField(ms, "Имя игрока:", mc.getSession().getUsername(), textStartX, textStartY, width - 56, 24);
            drawLabelAndField(ms, "Версия игры:", mc.getVersion(), textStartX, textStartY + lineHeight * 1, width - 56, 24);
            drawLabelAndField(ms, "Кодер:", "Herduka + regu11ar", textStartX, textStartY + lineHeight * 2, width - 56, 24);
            drawLabelAndField(ms, "Тип защиты:", "VMProtect + InternalGuard", textStartX, textStartY + lineHeight * 3, width - 56, 24);
            drawLabelAndField(ms, "Год выпуска:", "2025", textStartX, textStartY + lineHeight * 4, width - 56, 24);

            String copyright = "© NightWarr 2025 Все права защищены";
            int copyrightWidth = mc.fontRenderer.getStringWidth(copyright);
            Fonts.sfbold.drawText(ms, copyright, centerX - copyrightWidth / 2, y + height - 36, 0xFFAAAAAA, 8);
        }

        private void drawLabelAndField(MatrixStack ms, String label, String value, int x, int y, int width, int height) {
            Fonts.sfbold.drawText(ms, label, x, y + 8, 0xFFFFFFFF, 10);

            int labelWidth = mc.fontRenderer.getStringWidth(label) + 12;
            int fieldX = x + labelWidth;
            int fieldWidth = width - labelWidth;

            drawGradientRoundedRect(ms, fieldX, y, fieldWidth, height, 8, 0xFF2A2A2A, 0xFF1A1A1A);

            Fonts.sfbold.drawText(ms, value, fieldX + 8, y + 8, 0xFFE0E0E0, 10);
        }

        private void drawRoundedRect(MatrixStack ms, int x, int y, int width, int height, int radius, int color) {
            AbstractGui.fill(ms, x + radius, y, x + width - radius, y + height, color);
            AbstractGui.fill(ms, x, y + radius, x + width, y + height - radius, color);

            fillCircle(ms, x + radius, y + radius, radius, color);
            fillCircle(ms, x + width - radius - 1, y + radius, radius, color);
            fillCircle(ms, x + radius, y + height - radius - 1, radius, color);
            fillCircle(ms, x + width - radius - 1, y + height - radius - 1, radius, color);
        }

        private void drawGradientRoundedRect(MatrixStack ms, int x, int y, int width, int height, int radius, int startColor, int endColor) {
            for (int i = 0; i < height; i++) {
                int color = ColorUtils.lerpColor(startColor, endColor, (float) i / height);
                AbstractGui.fill(ms, x + radius, y + i, x + width - radius, y + i + 1, color);
                for (int dx = 0; dx < radius; dx++) {
                    int alpha = (int) (ColorUtils.alpha(color) * (Math.sqrt(radius * radius - dx * dx) / radius));
                    int edgeColor = (color & 0x00FFFFFF) | (alpha << 24);
                    AbstractGui.fill(ms, x + dx, y + i, x + dx + 1, y + i + 1, edgeColor);
                    AbstractGui.fill(ms, x + width - dx - 1, y + i, x + width - dx, y + i + 1, edgeColor);
                }
            }
        }

        private void drawShadowedRoundedRect(MatrixStack ms, int x, int y, int width, int height, int radius, int bgColor, int shadowColor) {
            int shadowOffset = 4;
            drawRoundedRect(ms, x + shadowOffset, y + shadowOffset, width, height, radius, shadowColor);
            drawRoundedRect(ms, x, y, width, height, radius, bgColor);
        }

        private void fillCircle(MatrixStack ms, int cx, int cy, int radius, int color) {
            for (int dy = -radius; dy <= radius; dy++) {
                int dxLimit = (int) Math.sqrt(radius * radius - dy * dy);
                AbstractGui.fill(ms, cx - dxLimit, cy + dy, cx + dxLimit + 1, cy + dy + 1, color);
            }
        }

        [USER=1367676]@override[/USER]
        public boolean mouseClicked(double mouseX, double mouseY, int button) {
            int width = 360, height = 260;
            int x = (this.width - width) / 2;
            int y = (this.height - height) / 2;
            int centerX = this.width / 2;
            int closeBtnY = y + height - 30;
            int closeBtnWidth = 80;
            int closeBtnHeight = 20;

            if (mouseX >= centerX - closeBtnWidth / 2 && mouseX <= centerX + closeBtnWidth / 2
                    && mouseY >= closeBtnY && mouseY <= closeBtnY + closeBtnHeight) {
                this.minecraft.displayGuiScreen(null);
                return true;
            }
            return super.mouseClicked(mouseX, mouseY, button);
        }

        [USER=1367676]@override[/USER]
        public boolean isPauseScreen() {
            return false;
        }
    }
}
SS
Посмотреть вложение 308847
ПРОСТО ПИЗДЕЦ НАХУЙ
как твой клиент
Сука завали своё ебало пидорас
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
вот кодик думаю сойдед вам


Кодик:
Expand Collapse Copy
package vm.protect.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import vm.protect.events.EventKey;
import vm.protect.functions.api.Category;
import vm.protect.functions.api.Function;
import vm.protect.functions.api.FunctionRegister;
import vm.protect.functions.settings.impl.BindSetting;
import vm.protect.utils.render.ColorUtils;
import vm.protect.utils.render.font.Fonts;

@FunctionRegister(name = "InfoWindow", description = "Открывает окно с информацией", type = Category.Misc)
public class InfoWindow extends Function {
    public BindSetting bind = new BindSetting("Open Info", 0);

    public InfoWindow() {
        this.addSettings(this.bind);
    }

    [USER=1474073]@Subscribe[/USER]
    private void onKey(EventKey e) {
        if (e.getKey() == this.bind.get())
            Minecraft.getInstance().displayGuiScreen(new AboutGui());
    }

    private static class AboutGui extends Screen {
        private final Minecraft mc = Minecraft.getInstance();

        protected AboutGui() {
            super(new StringTextComponent("About"));
        }

        [USER=1367676]@override[/USER]
        public void render(MatrixStack ms, int mouseX, int mouseY, float partialTicks) {
            int width = 360, height = 260;
            int x = (this.width - width) / 2;
            int y = (this.height - height) / 2;
            int radius = 16;

            drawShadowedRoundedRect(ms, x, y, width, height, radius, 0xFF121212, 0xCC000000);

            int centerX = this.width / 2;

            int textStartX = x + 28;
            int textStartY = y + 60;
            int lineHeight = 28;

            drawLabelAndField(ms, "Имя игрока:", mc.getSession().getUsername(), textStartX, textStartY, width - 56, 24);
            drawLabelAndField(ms, "Версия игры:", mc.getVersion(), textStartX, textStartY + lineHeight * 1, width - 56, 24);
            drawLabelAndField(ms, "Кодер:", "Herduka + regu11ar", textStartX, textStartY + lineHeight * 2, width - 56, 24);
            drawLabelAndField(ms, "Тип защиты:", "VMProtect + InternalGuard", textStartX, textStartY + lineHeight * 3, width - 56, 24);
            drawLabelAndField(ms, "Год выпуска:", "2025", textStartX, textStartY + lineHeight * 4, width - 56, 24);

            String copyright = "© NightWarr 2025 Все права защищены";
            int copyrightWidth = mc.fontRenderer.getStringWidth(copyright);
            Fonts.sfbold.drawText(ms, copyright, centerX - copyrightWidth / 2, y + height - 36, 0xFFAAAAAA, 8);
        }

        private void drawLabelAndField(MatrixStack ms, String label, String value, int x, int y, int width, int height) {
            Fonts.sfbold.drawText(ms, label, x, y + 8, 0xFFFFFFFF, 10);

            int labelWidth = mc.fontRenderer.getStringWidth(label) + 12;
            int fieldX = x + labelWidth;
            int fieldWidth = width - labelWidth;

            drawGradientRoundedRect(ms, fieldX, y, fieldWidth, height, 8, 0xFF2A2A2A, 0xFF1A1A1A);

            Fonts.sfbold.drawText(ms, value, fieldX + 8, y + 8, 0xFFE0E0E0, 10);
        }

        private void drawRoundedRect(MatrixStack ms, int x, int y, int width, int height, int radius, int color) {
            AbstractGui.fill(ms, x + radius, y, x + width - radius, y + height, color);
            AbstractGui.fill(ms, x, y + radius, x + width, y + height - radius, color);

            fillCircle(ms, x + radius, y + radius, radius, color);
            fillCircle(ms, x + width - radius - 1, y + radius, radius, color);
            fillCircle(ms, x + radius, y + height - radius - 1, radius, color);
            fillCircle(ms, x + width - radius - 1, y + height - radius - 1, radius, color);
        }

        private void drawGradientRoundedRect(MatrixStack ms, int x, int y, int width, int height, int radius, int startColor, int endColor) {
            for (int i = 0; i < height; i++) {
                int color = ColorUtils.lerpColor(startColor, endColor, (float) i / height);
                AbstractGui.fill(ms, x + radius, y + i, x + width - radius, y + i + 1, color);
                for (int dx = 0; dx < radius; dx++) {
                    int alpha = (int) (ColorUtils.alpha(color) * (Math.sqrt(radius * radius - dx * dx) / radius));
                    int edgeColor = (color & 0x00FFFFFF) | (alpha << 24);
                    AbstractGui.fill(ms, x + dx, y + i, x + dx + 1, y + i + 1, edgeColor);
                    AbstractGui.fill(ms, x + width - dx - 1, y + i, x + width - dx, y + i + 1, edgeColor);
                }
            }
        }

        private void drawShadowedRoundedRect(MatrixStack ms, int x, int y, int width, int height, int radius, int bgColor, int shadowColor) {
            int shadowOffset = 4;
            drawRoundedRect(ms, x + shadowOffset, y + shadowOffset, width, height, radius, shadowColor);
            drawRoundedRect(ms, x, y, width, height, radius, bgColor);
        }

        private void fillCircle(MatrixStack ms, int cx, int cy, int radius, int color) {
            for (int dy = -radius; dy <= radius; dy++) {
                int dxLimit = (int) Math.sqrt(radius * radius - dy * dy);
                AbstractGui.fill(ms, cx - dxLimit, cy + dy, cx + dxLimit + 1, cy + dy + 1, color);
            }
        }

        [USER=1367676]@override[/USER]
        public boolean mouseClicked(double mouseX, double mouseY, int button) {
            int width = 360, height = 260;
            int x = (this.width - width) / 2;
            int y = (this.height - height) / 2;
            int centerX = this.width / 2;
            int closeBtnY = y + height - 30;
            int closeBtnWidth = 80;
            int closeBtnHeight = 20;

            if (mouseX >= centerX - closeBtnWidth / 2 && mouseX <= centerX + closeBtnWidth / 2
                    && mouseY >= closeBtnY && mouseY <= closeBtnY + closeBtnHeight) {
                this.minecraft.displayGuiScreen(null);
                return true;
            }
            return super.mouseClicked(mouseX, mouseY, button);
        }

        [USER=1367676]@override[/USER]
        public boolean isPauseScreen() {
            return false;
        }
    }
}
SS
Посмотреть вложение 308847
Дерьмо
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
вот кодик думаю сойдед вам


Кодик:
Expand Collapse Copy
package vm.protect.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import vm.protect.events.EventKey;
import vm.protect.functions.api.Category;
import vm.protect.functions.api.Function;
import vm.protect.functions.api.FunctionRegister;
import vm.protect.functions.settings.impl.BindSetting;
import vm.protect.utils.render.ColorUtils;
import vm.protect.utils.render.font.Fonts;

@FunctionRegister(name = "InfoWindow", description = "Открывает окно с информацией", type = Category.Misc)
public class InfoWindow extends Function {
    public BindSetting bind = new BindSetting("Open Info", 0);

    public InfoWindow() {
        this.addSettings(this.bind);
    }

    [USER=1474073]@Subscribe[/USER]
    private void onKey(EventKey e) {
        if (e.getKey() == this.bind.get())
            Minecraft.getInstance().displayGuiScreen(new AboutGui());
    }

    private static class AboutGui extends Screen {
        private final Minecraft mc = Minecraft.getInstance();

        protected AboutGui() {
            super(new StringTextComponent("About"));
        }

        [USER=1367676]@override[/USER]
        public void render(MatrixStack ms, int mouseX, int mouseY, float partialTicks) {
            int width = 360, height = 260;
            int x = (this.width - width) / 2;
            int y = (this.height - height) / 2;
            int radius = 16;

            drawShadowedRoundedRect(ms, x, y, width, height, radius, 0xFF121212, 0xCC000000);

            int centerX = this.width / 2;

            int textStartX = x + 28;
            int textStartY = y + 60;
            int lineHeight = 28;

            drawLabelAndField(ms, "Имя игрока:", mc.getSession().getUsername(), textStartX, textStartY, width - 56, 24);
            drawLabelAndField(ms, "Версия игры:", mc.getVersion(), textStartX, textStartY + lineHeight * 1, width - 56, 24);
            drawLabelAndField(ms, "Кодер:", "Herduka + regu11ar", textStartX, textStartY + lineHeight * 2, width - 56, 24);
            drawLabelAndField(ms, "Тип защиты:", "VMProtect + InternalGuard", textStartX, textStartY + lineHeight * 3, width - 56, 24);
            drawLabelAndField(ms, "Год выпуска:", "2025", textStartX, textStartY + lineHeight * 4, width - 56, 24);

            String copyright = "© NightWarr 2025 Все права защищены";
            int copyrightWidth = mc.fontRenderer.getStringWidth(copyright);
            Fonts.sfbold.drawText(ms, copyright, centerX - copyrightWidth / 2, y + height - 36, 0xFFAAAAAA, 8);
        }

        private void drawLabelAndField(MatrixStack ms, String label, String value, int x, int y, int width, int height) {
            Fonts.sfbold.drawText(ms, label, x, y + 8, 0xFFFFFFFF, 10);

            int labelWidth = mc.fontRenderer.getStringWidth(label) + 12;
            int fieldX = x + labelWidth;
            int fieldWidth = width - labelWidth;

            drawGradientRoundedRect(ms, fieldX, y, fieldWidth, height, 8, 0xFF2A2A2A, 0xFF1A1A1A);

            Fonts.sfbold.drawText(ms, value, fieldX + 8, y + 8, 0xFFE0E0E0, 10);
        }

        private void drawRoundedRect(MatrixStack ms, int x, int y, int width, int height, int radius, int color) {
            AbstractGui.fill(ms, x + radius, y, x + width - radius, y + height, color);
            AbstractGui.fill(ms, x, y + radius, x + width, y + height - radius, color);

            fillCircle(ms, x + radius, y + radius, radius, color);
            fillCircle(ms, x + width - radius - 1, y + radius, radius, color);
            fillCircle(ms, x + radius, y + height - radius - 1, radius, color);
            fillCircle(ms, x + width - radius - 1, y + height - radius - 1, radius, color);
        }

        private void drawGradientRoundedRect(MatrixStack ms, int x, int y, int width, int height, int radius, int startColor, int endColor) {
            for (int i = 0; i < height; i++) {
                int color = ColorUtils.lerpColor(startColor, endColor, (float) i / height);
                AbstractGui.fill(ms, x + radius, y + i, x + width - radius, y + i + 1, color);
                for (int dx = 0; dx < radius; dx++) {
                    int alpha = (int) (ColorUtils.alpha(color) * (Math.sqrt(radius * radius - dx * dx) / radius));
                    int edgeColor = (color & 0x00FFFFFF) | (alpha << 24);
                    AbstractGui.fill(ms, x + dx, y + i, x + dx + 1, y + i + 1, edgeColor);
                    AbstractGui.fill(ms, x + width - dx - 1, y + i, x + width - dx, y + i + 1, edgeColor);
                }
            }
        }

        private void drawShadowedRoundedRect(MatrixStack ms, int x, int y, int width, int height, int radius, int bgColor, int shadowColor) {
            int shadowOffset = 4;
            drawRoundedRect(ms, x + shadowOffset, y + shadowOffset, width, height, radius, shadowColor);
            drawRoundedRect(ms, x, y, width, height, radius, bgColor);
        }

        private void fillCircle(MatrixStack ms, int cx, int cy, int radius, int color) {
            for (int dy = -radius; dy <= radius; dy++) {
                int dxLimit = (int) Math.sqrt(radius * radius - dy * dy);
                AbstractGui.fill(ms, cx - dxLimit, cy + dy, cx + dxLimit + 1, cy + dy + 1, color);
            }
        }

        [USER=1367676]@override[/USER]
        public boolean mouseClicked(double mouseX, double mouseY, int button) {
            int width = 360, height = 260;
            int x = (this.width - width) / 2;
            int y = (this.height - height) / 2;
            int centerX = this.width / 2;
            int closeBtnY = y + height - 30;
            int closeBtnWidth = 80;
            int closeBtnHeight = 20;

            if (mouseX >= centerX - closeBtnWidth / 2 && mouseX <= centerX + closeBtnWidth / 2
                    && mouseY >= closeBtnY && mouseY <= closeBtnY + closeBtnHeight) {
                this.minecraft.displayGuiScreen(null);
                return true;
            }
            return super.mouseClicked(mouseX, mouseY, button);
        }

        [USER=1367676]@override[/USER]
        public boolean isPauseScreen() {
            return false;
        }
    }
}
SS
Посмотреть вложение 308847
кому это надо? реней эксп про чат гпт
drawLabelAndField(ms, "Имя игрока:", mc.getSession().getUsername(), textStartX, textStartY, width - 56, 24);


сам писал явно
 
вот кодик думаю сойдед вам


Кодик:
Expand Collapse Copy
package vm.protect.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import vm.protect.events.EventKey;
import vm.protect.functions.api.Category;
import vm.protect.functions.api.Function;
import vm.protect.functions.api.FunctionRegister;
import vm.protect.functions.settings.impl.BindSetting;
import vm.protect.utils.render.ColorUtils;
import vm.protect.utils.render.font.Fonts;

@FunctionRegister(name = "InfoWindow", description = "Открывает окно с информацией", type = Category.Misc)
public class InfoWindow extends Function {
    public BindSetting bind = new BindSetting("Open Info", 0);

    public InfoWindow() {
        this.addSettings(this.bind);
    }

    [USER=1474073]@Subscribe[/USER]
    private void onKey(EventKey e) {
        if (e.getKey() == this.bind.get())
            Minecraft.getInstance().displayGuiScreen(new AboutGui());
    }

    private static class AboutGui extends Screen {
        private final Minecraft mc = Minecraft.getInstance();

        protected AboutGui() {
            super(new StringTextComponent("About"));
        }

        [USER=1367676]@override[/USER]
        public void render(MatrixStack ms, int mouseX, int mouseY, float partialTicks) {
            int width = 360, height = 260;
            int x = (this.width - width) / 2;
            int y = (this.height - height) / 2;
            int radius = 16;

            drawShadowedRoundedRect(ms, x, y, width, height, radius, 0xFF121212, 0xCC000000);

            int centerX = this.width / 2;

            int textStartX = x + 28;
            int textStartY = y + 60;
            int lineHeight = 28;

            drawLabelAndField(ms, "Имя игрока:", mc.getSession().getUsername(), textStartX, textStartY, width - 56, 24);
            drawLabelAndField(ms, "Версия игры:", mc.getVersion(), textStartX, textStartY + lineHeight * 1, width - 56, 24);
            drawLabelAndField(ms, "Кодер:", "Herduka + regu11ar", textStartX, textStartY + lineHeight * 2, width - 56, 24);
            drawLabelAndField(ms, "Тип защиты:", "VMProtect + InternalGuard", textStartX, textStartY + lineHeight * 3, width - 56, 24);
            drawLabelAndField(ms, "Год выпуска:", "2025", textStartX, textStartY + lineHeight * 4, width - 56, 24);

            String copyright = "© NightWarr 2025 Все права защищены";
            int copyrightWidth = mc.fontRenderer.getStringWidth(copyright);
            Fonts.sfbold.drawText(ms, copyright, centerX - copyrightWidth / 2, y + height - 36, 0xFFAAAAAA, 8);
        }

        private void drawLabelAndField(MatrixStack ms, String label, String value, int x, int y, int width, int height) {
            Fonts.sfbold.drawText(ms, label, x, y + 8, 0xFFFFFFFF, 10);

            int labelWidth = mc.fontRenderer.getStringWidth(label) + 12;
            int fieldX = x + labelWidth;
            int fieldWidth = width - labelWidth;

            drawGradientRoundedRect(ms, fieldX, y, fieldWidth, height, 8, 0xFF2A2A2A, 0xFF1A1A1A);

            Fonts.sfbold.drawText(ms, value, fieldX + 8, y + 8, 0xFFE0E0E0, 10);
        }

        private void drawRoundedRect(MatrixStack ms, int x, int y, int width, int height, int radius, int color) {
            AbstractGui.fill(ms, x + radius, y, x + width - radius, y + height, color);
            AbstractGui.fill(ms, x, y + radius, x + width, y + height - radius, color);

            fillCircle(ms, x + radius, y + radius, radius, color);
            fillCircle(ms, x + width - radius - 1, y + radius, radius, color);
            fillCircle(ms, x + radius, y + height - radius - 1, radius, color);
            fillCircle(ms, x + width - radius - 1, y + height - radius - 1, radius, color);
        }

        private void drawGradientRoundedRect(MatrixStack ms, int x, int y, int width, int height, int radius, int startColor, int endColor) {
            for (int i = 0; i < height; i++) {
                int color = ColorUtils.lerpColor(startColor, endColor, (float) i / height);
                AbstractGui.fill(ms, x + radius, y + i, x + width - radius, y + i + 1, color);
                for (int dx = 0; dx < radius; dx++) {
                    int alpha = (int) (ColorUtils.alpha(color) * (Math.sqrt(radius * radius - dx * dx) / radius));
                    int edgeColor = (color & 0x00FFFFFF) | (alpha << 24);
                    AbstractGui.fill(ms, x + dx, y + i, x + dx + 1, y + i + 1, edgeColor);
                    AbstractGui.fill(ms, x + width - dx - 1, y + i, x + width - dx, y + i + 1, edgeColor);
                }
            }
        }

        private void drawShadowedRoundedRect(MatrixStack ms, int x, int y, int width, int height, int radius, int bgColor, int shadowColor) {
            int shadowOffset = 4;
            drawRoundedRect(ms, x + shadowOffset, y + shadowOffset, width, height, radius, shadowColor);
            drawRoundedRect(ms, x, y, width, height, radius, bgColor);
        }

        private void fillCircle(MatrixStack ms, int cx, int cy, int radius, int color) {
            for (int dy = -radius; dy <= radius; dy++) {
                int dxLimit = (int) Math.sqrt(radius * radius - dy * dy);
                AbstractGui.fill(ms, cx - dxLimit, cy + dy, cx + dxLimit + 1, cy + dy + 1, color);
            }
        }

        [USER=1367676]@override[/USER]
        public boolean mouseClicked(double mouseX, double mouseY, int button) {
            int width = 360, height = 260;
            int x = (this.width - width) / 2;
            int y = (this.height - height) / 2;
            int centerX = this.width / 2;
            int closeBtnY = y + height - 30;
            int closeBtnWidth = 80;
            int closeBtnHeight = 20;

            if (mouseX >= centerX - closeBtnWidth / 2 && mouseX <= centerX + closeBtnWidth / 2
                    && mouseY >= closeBtnY && mouseY <= closeBtnY + closeBtnHeight) {
                this.minecraft.displayGuiScreen(null);
                return true;
            }
            return super.mouseClicked(mouseX, mouseY, button);
        }

        [USER=1367676]@override[/USER]
        public boolean isPauseScreen() {
            return false;
        }
    }
}
SS
Посмотреть вложение 308847

ну и хуетень
 
Назад
Сверху Снизу