Подписывайтесь на наш Telegram и не пропускайте важные новости! Перейти

Нормальные кейстрокесы експ 3.1

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
26 Фев 2024
Сообщения
454
Реакции
1
увидел что многие ставят либо хуйню которую спастили, либо хуйню которую сделали, по этому вот вам нормальные кейстрокесы, писал 15 минут
KeyStrokesRenderer:
Expand Collapse Copy
package ru.ancientmc.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import ru.ancientmc.events.EventDisplay;
import ru.ancientmc.functions.impl.render.HUD;
import ru.ancientmc.ui.display.ElementRenderer;
import ru.ancientmc.utils.drag.Dragging;
import ru.ancientmc.utils.math.StopWatch;
import ru.ancientmc.utils.math.Vector4i;
import ru.ancientmc.utils.render.ColorUtils;
import ru.ancientmc.utils.render.DisplayUtils;
import ru.ancientmc.utils.render.Scissor;
import ru.ancientmc.utils.render.font.Fonts;
import ru.ancientmc.utils.text.GradientUtil;
import net.minecraft.util.math.vector.Vector4f;
import net.minecraft.util.text.ITextComponent;

public class KeyStrokesRenderer implements ElementRenderer {
    private StopWatch time = new StopWatch();
    private final Dragging dragging;
    private float width;
    private float height;

    public void render(EventDisplay eventDisplay) {

        MatrixStack ms = eventDisplay.getMatrixStack();

        float posX = this.dragging.getX();
        float posY = this.dragging.getY();
        float padding = 3.0F;
        float font_size = 8.0F;
        float textPadding = 23.0F;

        String w = "W";
        String a = "A";
        String s = "S";
        String d = "D";
        String space = "SPACE";

        this.drawRect(posX, posY, this.width - 2.0F, this.height);

        Fonts.sfbold.drawCenteredText(ms, w, posX + 43, posY + padding - 25, ColorUtils.rgb(0,0,0), font_size);
        Fonts.sfbold.drawCenteredText(ms, a, posX - textPadding + 35, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, space, posX + 42, posY + 38.5F, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, s, posX + 43, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, d, posX + textPadding + 50, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );

        this.onClick(eventDisplay);
        float maxWidth = Fonts.sfMedium.getWidth(w, font_size) + padding * 2.0F;
        float localHeight = font_size + padding * 2.0F;

        Scissor.push();
        Scissor.setFromComponentCoordinates((double)posX, (double)posY, (double)(this.width - 2.0F), (double)this.height);
        Scissor.unset();
        Scissor.pop();

        this.width = Math.max(maxWidth, 80.0F);
        this.height = localHeight + 2.5F;
        this.dragging.setWidth(this.width);
        this.dragging.setHeight(this.height);
    }

    public void drawRect(float x, float y, float width, float height) {
        final Vector4i vector4i = new Vector4i(HUD.getColor(0, 1), HUD.getColor(0, 1), HUD.getColor(90, 1), HUD.getColor(90, 1));
        width = 28.0F;

        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawRoundedRect(x + 30, y, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//S

        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawRoundedRect(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//W

        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawRoundedRect(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(255, 255, 255, 255));//space

        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawRoundedRect(x, y, width, height + 10, 4, ColorUtils.rgba(255, 255, 255, 255));//A

        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawRoundedRect(x + 60, y, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//D


    }


    public void onClick(EventDisplay eventDisplay) {
        width = 28.0F;
        MatrixStack ms = eventDisplay.getMatrixStack();

        float posX = this.dragging.getX();
        float posY = this.dragging.getY();
        float x = this.dragging.getX();
        float y = this.dragging .getY();
        float font_size = 8.0F;
        if (mc.gameSettings.keyBindBack.pressed) {
            DisplayUtils.drawRoundedRect(x + 30,y,width,height + 10,4,ColorUtils.getColor(0));
            String s = "S";
            Fonts.sfbold.drawCenteredText(ms, s, posX + 43, posY + 9, ColorUtils.rgb(0,0,0), font_size ); //s
        }

        if (mc.gameSettings.keyBindJump.pressed) {
            DisplayUtils.drawRoundedRect(x,y + 30,width + 60,height + 7,4,ColorUtils.getColor(0));
            String space = "SPACE";
            Fonts.sfbold.drawCenteredText(ms, space, posX + 42, posY + 38.5F, ColorUtils.rgb(0,0,0), font_size );//space
        }

        if (mc.gameSettings.keyBindForward.pressed) {
            DisplayUtils.drawRoundedRect(x + 30,y - 30,width,height + 10,4,ColorUtils.getColor(0));
            String w = "W";
            Fonts.sfbold.drawCenteredText(ms, w, posX + 43, posY - 22   , ColorUtils.rgb(0,0,0), font_size);//w
        }

        if (mc.gameSettings.keyBindLeft.pressed) {
            DisplayUtils.drawRoundedRect(x,y,width,height + 10,4,ColorUtils.getColor(0));
            String a = "A";
            Fonts.sfbold.drawCenteredText(ms, a, posX + 12, posY + 9, ColorUtils.rgb(0,0,0), font_size );//a
        }

        if (mc.gameSettings.keyBindRight.pressed) {
            DisplayUtils.drawRoundedRect(x + 60,y,width,height + 10,4,ColorUtils.getColor(0));
            String d = "D";
            Fonts.sfbold.drawCenteredText(ms, d, posX + 73, posY + 9, ColorUtils.rgb(0,0,0), font_size );//d
        }

    }

    public KeyStrokesRenderer(Dragging dragging) {
        this.dragging = dragging;
    }
}

сс
когда не нажаты клавиши
java_Bn1YodydeN.png

когда нажаты все кроме спайса
java_c1SQA1w2yq.png
 
50/50, как по мне не оч
 
Ну такое себе
 
Ну 50 на 50
 
фу фигня какая то, даже я с опытом 2 недельки лучше сделаю.
 
увидел что многие ставят либо хуйню которую спастили, либо хуйню которую сделали, по этому вот вам нормальные кейстрокесы, писал 15 минут
KeyStrokesRenderer:
Expand Collapse Copy
package ru.ancientmc.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import ru.ancientmc.events.EventDisplay;
import ru.ancientmc.functions.impl.render.HUD;
import ru.ancientmc.ui.display.ElementRenderer;
import ru.ancientmc.utils.drag.Dragging;
import ru.ancientmc.utils.math.StopWatch;
import ru.ancientmc.utils.math.Vector4i;
import ru.ancientmc.utils.render.ColorUtils;
import ru.ancientmc.utils.render.DisplayUtils;
import ru.ancientmc.utils.render.Scissor;
import ru.ancientmc.utils.render.font.Fonts;
import ru.ancientmc.utils.text.GradientUtil;
import net.minecraft.util.math.vector.Vector4f;
import net.minecraft.util.text.ITextComponent;

public class KeyStrokesRenderer implements ElementRenderer {
    private StopWatch time = new StopWatch();
    private final Dragging dragging;
    private float width;
    private float height;

    public void render(EventDisplay eventDisplay) {

        MatrixStack ms = eventDisplay.getMatrixStack();

        float posX = this.dragging.getX();
        float posY = this.dragging.getY();
        float padding = 3.0F;
        float font_size = 8.0F;
        float textPadding = 23.0F;

        String w = "W";
        String a = "A";
        String s = "S";
        String d = "D";
        String space = "SPACE";

        this.drawRect(posX, posY, this.width - 2.0F, this.height);

        Fonts.sfbold.drawCenteredText(ms, w, posX + 43, posY + padding - 25, ColorUtils.rgb(0,0,0), font_size);
        Fonts.sfbold.drawCenteredText(ms, a, posX - textPadding + 35, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, space, posX + 42, posY + 38.5F, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, s, posX + 43, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, d, posX + textPadding + 50, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );

        this.onClick(eventDisplay);
        float maxWidth = Fonts.sfMedium.getWidth(w, font_size) + padding * 2.0F;
        float localHeight = font_size + padding * 2.0F;

        Scissor.push();
        Scissor.setFromComponentCoordinates((double)posX, (double)posY, (double)(this.width - 2.0F), (double)this.height);
        Scissor.unset();
        Scissor.pop();

        this.width = Math.max(maxWidth, 80.0F);
        this.height = localHeight + 2.5F;
        this.dragging.setWidth(this.width);
        this.dragging.setHeight(this.height);
    }

    public void drawRect(float x, float y, float width, float height) {
        final Vector4i vector4i = new Vector4i(HUD.getColor(0, 1), HUD.getColor(0, 1), HUD.getColor(90, 1), HUD.getColor(90, 1));
        width = 28.0F;

        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawRoundedRect(x + 30, y, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//S

        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawRoundedRect(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//W

        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawRoundedRect(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(255, 255, 255, 255));//space

        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawRoundedRect(x, y, width, height + 10, 4, ColorUtils.rgba(255, 255, 255, 255));//A

        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawRoundedRect(x + 60, y, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//D


    }


    public void onClick(EventDisplay eventDisplay) {
        width = 28.0F;
        MatrixStack ms = eventDisplay.getMatrixStack();

        float posX = this.dragging.getX();
        float posY = this.dragging.getY();
        float x = this.dragging.getX();
        float y = this.dragging .getY();
        float font_size = 8.0F;
        if (mc.gameSettings.keyBindBack.pressed) {
            DisplayUtils.drawRoundedRect(x + 30,y,width,height + 10,4,ColorUtils.getColor(0));
            String s = "S";
            Fonts.sfbold.drawCenteredText(ms, s, posX + 43, posY + 9, ColorUtils.rgb(0,0,0), font_size ); //s
        }

        if (mc.gameSettings.keyBindJump.pressed) {
            DisplayUtils.drawRoundedRect(x,y + 30,width + 60,height + 7,4,ColorUtils.getColor(0));
            String space = "SPACE";
            Fonts.sfbold.drawCenteredText(ms, space, posX + 42, posY + 38.5F, ColorUtils.rgb(0,0,0), font_size );//space
        }

        if (mc.gameSettings.keyBindForward.pressed) {
            DisplayUtils.drawRoundedRect(x + 30,y - 30,width,height + 10,4,ColorUtils.getColor(0));
            String w = "W";
            Fonts.sfbold.drawCenteredText(ms, w, posX + 43, posY - 22   , ColorUtils.rgb(0,0,0), font_size);//w
        }

        if (mc.gameSettings.keyBindLeft.pressed) {
            DisplayUtils.drawRoundedRect(x,y,width,height + 10,4,ColorUtils.getColor(0));
            String a = "A";
            Fonts.sfbold.drawCenteredText(ms, a, posX + 12, posY + 9, ColorUtils.rgb(0,0,0), font_size );//a
        }

        if (mc.gameSettings.keyBindRight.pressed) {
            DisplayUtils.drawRoundedRect(x + 60,y,width,height + 10,4,ColorUtils.getColor(0));
            String d = "D";
            Fonts.sfbold.drawCenteredText(ms, d, posX + 73, posY + 9, ColorUtils.rgb(0,0,0), font_size );//d
        }

    }

    public KeyStrokesRenderer(Dragging dragging) {
        this.dragging = dragging;
    }
}

сс
когда не нажаты клавиши Посмотреть вложение 280866
когда нажаты все кроме спайса Посмотреть вложение 280867
удаляй тему к хуям, если нужно сделать нормальные кейстрокесы, лучше обращаться к дизайнерам
 
увидел что многие ставят либо хуйню которую спастили, либо хуйню которую сделали, по этому вот вам нормальные кейстрокесы
высрал хуйню которая никому в здравом уме никогда не пригодится
и сидит оправдывается
 
увидел что многие ставят либо хуйню которую спастили, либо хуйню которую сделали, по этому вот вам нормальные кейстрокесы, писал 15 минут
KeyStrokesRenderer:
Expand Collapse Copy
package ru.ancientmc.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import ru.ancientmc.events.EventDisplay;
import ru.ancientmc.functions.impl.render.HUD;
import ru.ancientmc.ui.display.ElementRenderer;
import ru.ancientmc.utils.drag.Dragging;
import ru.ancientmc.utils.math.StopWatch;
import ru.ancientmc.utils.math.Vector4i;
import ru.ancientmc.utils.render.ColorUtils;
import ru.ancientmc.utils.render.DisplayUtils;
import ru.ancientmc.utils.render.Scissor;
import ru.ancientmc.utils.render.font.Fonts;
import ru.ancientmc.utils.text.GradientUtil;
import net.minecraft.util.math.vector.Vector4f;
import net.minecraft.util.text.ITextComponent;

public class KeyStrokesRenderer implements ElementRenderer {
    private StopWatch time = new StopWatch();
    private final Dragging dragging;
    private float width;
    private float height;

    public void render(EventDisplay eventDisplay) {

        MatrixStack ms = eventDisplay.getMatrixStack();

        float posX = this.dragging.getX();
        float posY = this.dragging.getY();
        float padding = 3.0F;
        float font_size = 8.0F;
        float textPadding = 23.0F;

        String w = "W";
        String a = "A";
        String s = "S";
        String d = "D";
        String space = "SPACE";

        this.drawRect(posX, posY, this.width - 2.0F, this.height);

        Fonts.sfbold.drawCenteredText(ms, w, posX + 43, posY + padding - 25, ColorUtils.rgb(0,0,0), font_size);
        Fonts.sfbold.drawCenteredText(ms, a, posX - textPadding + 35, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, space, posX + 42, posY + 38.5F, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, s, posX + 43, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, d, posX + textPadding + 50, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );

        this.onClick(eventDisplay);
        float maxWidth = Fonts.sfMedium.getWidth(w, font_size) + padding * 2.0F;
        float localHeight = font_size + padding * 2.0F;

        Scissor.push();
        Scissor.setFromComponentCoordinates((double)posX, (double)posY, (double)(this.width - 2.0F), (double)this.height);
        Scissor.unset();
        Scissor.pop();

        this.width = Math.max(maxWidth, 80.0F);
        this.height = localHeight + 2.5F;
        this.dragging.setWidth(this.width);
        this.dragging.setHeight(this.height);
    }

    public void drawRect(float x, float y, float width, float height) {
        final Vector4i vector4i = new Vector4i(HUD.getColor(0, 1), HUD.getColor(0, 1), HUD.getColor(90, 1), HUD.getColor(90, 1));
        width = 28.0F;

        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawRoundedRect(x + 30, y, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//S

        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawRoundedRect(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//W

        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawRoundedRect(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(255, 255, 255, 255));//space

        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawRoundedRect(x, y, width, height + 10, 4, ColorUtils.rgba(255, 255, 255, 255));//A

        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawRoundedRect(x + 60, y, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//D


    }


    public void onClick(EventDisplay eventDisplay) {
        width = 28.0F;
        MatrixStack ms = eventDisplay.getMatrixStack();

        float posX = this.dragging.getX();
        float posY = this.dragging.getY();
        float x = this.dragging.getX();
        float y = this.dragging .getY();
        float font_size = 8.0F;
        if (mc.gameSettings.keyBindBack.pressed) {
            DisplayUtils.drawRoundedRect(x + 30,y,width,height + 10,4,ColorUtils.getColor(0));
            String s = "S";
            Fonts.sfbold.drawCenteredText(ms, s, posX + 43, posY + 9, ColorUtils.rgb(0,0,0), font_size ); //s
        }

        if (mc.gameSettings.keyBindJump.pressed) {
            DisplayUtils.drawRoundedRect(x,y + 30,width + 60,height + 7,4,ColorUtils.getColor(0));
            String space = "SPACE";
            Fonts.sfbold.drawCenteredText(ms, space, posX + 42, posY + 38.5F, ColorUtils.rgb(0,0,0), font_size );//space
        }

        if (mc.gameSettings.keyBindForward.pressed) {
            DisplayUtils.drawRoundedRect(x + 30,y - 30,width,height + 10,4,ColorUtils.getColor(0));
            String w = "W";
            Fonts.sfbold.drawCenteredText(ms, w, posX + 43, posY - 22   , ColorUtils.rgb(0,0,0), font_size);//w
        }

        if (mc.gameSettings.keyBindLeft.pressed) {
            DisplayUtils.drawRoundedRect(x,y,width,height + 10,4,ColorUtils.getColor(0));
            String a = "A";
            Fonts.sfbold.drawCenteredText(ms, a, posX + 12, posY + 9, ColorUtils.rgb(0,0,0), font_size );//a
        }

        if (mc.gameSettings.keyBindRight.pressed) {
            DisplayUtils.drawRoundedRect(x + 60,y,width,height + 10,4,ColorUtils.getColor(0));
            String d = "D";
            Fonts.sfbold.drawCenteredText(ms, d, posX + 73, posY + 9, ColorUtils.rgb(0,0,0), font_size );//d
        }

    }

    public KeyStrokesRenderer(Dragging dragging) {
        this.dragging = dragging;
    }
}

сс
когда не нажаты клавиши Посмотреть вложение 280866
когда нажаты все кроме спайса Посмотреть вложение 280867
и сидит оправдывается
я не оправдывался, писал 15 минут
 
так ты взял код того что "пастят" и поменял цвета, много ума не нужно,было б круто если сделал анимацией а так хлам
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
увидел что многие ставят либо хуйню которую спастили, либо хуйню которую сделали, по этому вот вам нормальные кейстрокесы, писал 15 минут
KeyStrokesRenderer:
Expand Collapse Copy
package ru.ancientmc.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import ru.ancientmc.events.EventDisplay;
import ru.ancientmc.functions.impl.render.HUD;
import ru.ancientmc.ui.display.ElementRenderer;
import ru.ancientmc.utils.drag.Dragging;
import ru.ancientmc.utils.math.StopWatch;
import ru.ancientmc.utils.math.Vector4i;
import ru.ancientmc.utils.render.ColorUtils;
import ru.ancientmc.utils.render.DisplayUtils;
import ru.ancientmc.utils.render.Scissor;
import ru.ancientmc.utils.render.font.Fonts;
import ru.ancientmc.utils.text.GradientUtil;
import net.minecraft.util.math.vector.Vector4f;
import net.minecraft.util.text.ITextComponent;

public class KeyStrokesRenderer implements ElementRenderer {
    private StopWatch time = new StopWatch();
    private final Dragging dragging;
    private float width;
    private float height;

    public void render(EventDisplay eventDisplay) {

        MatrixStack ms = eventDisplay.getMatrixStack();

        float posX = this.dragging.getX();
        float posY = this.dragging.getY();
        float padding = 3.0F;
        float font_size = 8.0F;
        float textPadding = 23.0F;

        String w = "W";
        String a = "A";
        String s = "S";
        String d = "D";
        String space = "SPACE";

        this.drawRect(posX, posY, this.width - 2.0F, this.height);

        Fonts.sfbold.drawCenteredText(ms, w, posX + 43, posY + padding - 25, ColorUtils.rgb(0,0,0), font_size);
        Fonts.sfbold.drawCenteredText(ms, a, posX - textPadding + 35, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, space, posX + 42, posY + 38.5F, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, s, posX + 43, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, d, posX + textPadding + 50, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );

        this.onClick(eventDisplay);
        float maxWidth = Fonts.sfMedium.getWidth(w, font_size) + padding * 2.0F;
        float localHeight = font_size + padding * 2.0F;

        Scissor.push();
        Scissor.setFromComponentCoordinates((double)posX, (double)posY, (double)(this.width - 2.0F), (double)this.height);
        Scissor.unset();
        Scissor.pop();

        this.width = Math.max(maxWidth, 80.0F);
        this.height = localHeight + 2.5F;
        this.dragging.setWidth(this.width);
        this.dragging.setHeight(this.height);
    }

    public void drawRect(float x, float y, float width, float height) {
        final Vector4i vector4i = new Vector4i(HUD.getColor(0, 1), HUD.getColor(0, 1), HUD.getColor(90, 1), HUD.getColor(90, 1));
        width = 28.0F;

        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawRoundedRect(x + 30, y, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//S

        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawRoundedRect(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//W

        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawRoundedRect(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(255, 255, 255, 255));//space

        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawRoundedRect(x, y, width, height + 10, 4, ColorUtils.rgba(255, 255, 255, 255));//A

        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawRoundedRect(x + 60, y, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//D


    }


    public void onClick(EventDisplay eventDisplay) {
        width = 28.0F;
        MatrixStack ms = eventDisplay.getMatrixStack();

        float posX = this.dragging.getX();
        float posY = this.dragging.getY();
        float x = this.dragging.getX();
        float y = this.dragging .getY();
        float font_size = 8.0F;
        if (mc.gameSettings.keyBindBack.pressed) {
            DisplayUtils.drawRoundedRect(x + 30,y,width,height + 10,4,ColorUtils.getColor(0));
            String s = "S";
            Fonts.sfbold.drawCenteredText(ms, s, posX + 43, posY + 9, ColorUtils.rgb(0,0,0), font_size ); //s
        }

        if (mc.gameSettings.keyBindJump.pressed) {
            DisplayUtils.drawRoundedRect(x,y + 30,width + 60,height + 7,4,ColorUtils.getColor(0));
            String space = "SPACE";
            Fonts.sfbold.drawCenteredText(ms, space, posX + 42, posY + 38.5F, ColorUtils.rgb(0,0,0), font_size );//space
        }

        if (mc.gameSettings.keyBindForward.pressed) {
            DisplayUtils.drawRoundedRect(x + 30,y - 30,width,height + 10,4,ColorUtils.getColor(0));
            String w = "W";
            Fonts.sfbold.drawCenteredText(ms, w, posX + 43, posY - 22   , ColorUtils.rgb(0,0,0), font_size);//w
        }

        if (mc.gameSettings.keyBindLeft.pressed) {
            DisplayUtils.drawRoundedRect(x,y,width,height + 10,4,ColorUtils.getColor(0));
            String a = "A";
            Fonts.sfbold.drawCenteredText(ms, a, posX + 12, posY + 9, ColorUtils.rgb(0,0,0), font_size );//a
        }

        if (mc.gameSettings.keyBindRight.pressed) {
            DisplayUtils.drawRoundedRect(x + 60,y,width,height + 10,4,ColorUtils.getColor(0));
            String d = "D";
            Fonts.sfbold.drawCenteredText(ms, d, posX + 73, posY + 9, ColorUtils.rgb(0,0,0), font_size );//d
        }

    }

    public KeyStrokesRenderer(Dragging dragging) {
        this.dragging = dragging;
    }
}

сс
когда не нажаты клавиши Посмотреть вложение 280866
когда нажаты все кроме спайса Посмотреть вложение 280867
как же это уебищно выглядит не пости на этот форум больше никогда нахуй НИКОГДА не ломай нам психику
 
эт полная хуйня ахах ты че
 
увидел что многие ставят либо хуйню которую спастили, либо хуйню которую сделали, по этому вот вам нормальные кейстрокесы, писал 15 минут
KeyStrokesRenderer:
Expand Collapse Copy
package ru.ancientmc.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import ru.ancientmc.events.EventDisplay;
import ru.ancientmc.functions.impl.render.HUD;
import ru.ancientmc.ui.display.ElementRenderer;
import ru.ancientmc.utils.drag.Dragging;
import ru.ancientmc.utils.math.StopWatch;
import ru.ancientmc.utils.math.Vector4i;
import ru.ancientmc.utils.render.ColorUtils;
import ru.ancientmc.utils.render.DisplayUtils;
import ru.ancientmc.utils.render.Scissor;
import ru.ancientmc.utils.render.font.Fonts;
import ru.ancientmc.utils.text.GradientUtil;
import net.minecraft.util.math.vector.Vector4f;
import net.minecraft.util.text.ITextComponent;

public class KeyStrokesRenderer implements ElementRenderer {
    private StopWatch time = new StopWatch();
    private final Dragging dragging;
    private float width;
    private float height;

    public void render(EventDisplay eventDisplay) {

        MatrixStack ms = eventDisplay.getMatrixStack();

        float posX = this.dragging.getX();
        float posY = this.dragging.getY();
        float padding = 3.0F;
        float font_size = 8.0F;
        float textPadding = 23.0F;

        String w = "W";
        String a = "A";
        String s = "S";
        String d = "D";
        String space = "SPACE";

        this.drawRect(posX, posY, this.width - 2.0F, this.height);

        Fonts.sfbold.drawCenteredText(ms, w, posX + 43, posY + padding - 25, ColorUtils.rgb(0,0,0), font_size);
        Fonts.sfbold.drawCenteredText(ms, a, posX - textPadding + 35, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, space, posX + 42, posY + 38.5F, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, s, posX + 43, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, d, posX + textPadding + 50, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );

        this.onClick(eventDisplay);
        float maxWidth = Fonts.sfMedium.getWidth(w, font_size) + padding * 2.0F;
        float localHeight = font_size + padding * 2.0F;

        Scissor.push();
        Scissor.setFromComponentCoordinates((double)posX, (double)posY, (double)(this.width - 2.0F), (double)this.height);
        Scissor.unset();
        Scissor.pop();

        this.width = Math.max(maxWidth, 80.0F);
        this.height = localHeight + 2.5F;
        this.dragging.setWidth(this.width);
        this.dragging.setHeight(this.height);
    }

    public void drawRect(float x, float y, float width, float height) {
        final Vector4i vector4i = new Vector4i(HUD.getColor(0, 1), HUD.getColor(0, 1), HUD.getColor(90, 1), HUD.getColor(90, 1));
        width = 28.0F;

        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawRoundedRect(x + 30, y, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//S

        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawRoundedRect(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//W

        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawRoundedRect(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(255, 255, 255, 255));//space

        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawRoundedRect(x, y, width, height + 10, 4, ColorUtils.rgba(255, 255, 255, 255));//A

        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawRoundedRect(x + 60, y, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//D


    }


    public void onClick(EventDisplay eventDisplay) {
        width = 28.0F;
        MatrixStack ms = eventDisplay.getMatrixStack();

        float posX = this.dragging.getX();
        float posY = this.dragging.getY();
        float x = this.dragging.getX();
        float y = this.dragging .getY();
        float font_size = 8.0F;
        if (mc.gameSettings.keyBindBack.pressed) {
            DisplayUtils.drawRoundedRect(x + 30,y,width,height + 10,4,ColorUtils.getColor(0));
            String s = "S";
            Fonts.sfbold.drawCenteredText(ms, s, posX + 43, posY + 9, ColorUtils.rgb(0,0,0), font_size ); //s
        }

        if (mc.gameSettings.keyBindJump.pressed) {
            DisplayUtils.drawRoundedRect(x,y + 30,width + 60,height + 7,4,ColorUtils.getColor(0));
            String space = "SPACE";
            Fonts.sfbold.drawCenteredText(ms, space, posX + 42, posY + 38.5F, ColorUtils.rgb(0,0,0), font_size );//space
        }

        if (mc.gameSettings.keyBindForward.pressed) {
            DisplayUtils.drawRoundedRect(x + 30,y - 30,width,height + 10,4,ColorUtils.getColor(0));
            String w = "W";
            Fonts.sfbold.drawCenteredText(ms, w, posX + 43, posY - 22   , ColorUtils.rgb(0,0,0), font_size);//w
        }

        if (mc.gameSettings.keyBindLeft.pressed) {
            DisplayUtils.drawRoundedRect(x,y,width,height + 10,4,ColorUtils.getColor(0));
            String a = "A";
            Fonts.sfbold.drawCenteredText(ms, a, posX + 12, posY + 9, ColorUtils.rgb(0,0,0), font_size );//a
        }

        if (mc.gameSettings.keyBindRight.pressed) {
            DisplayUtils.drawRoundedRect(x + 60,y,width,height + 10,4,ColorUtils.getColor(0));
            String d = "D";
            Fonts.sfbold.drawCenteredText(ms, d, posX + 73, posY + 9, ColorUtils.rgb(0,0,0), font_size );//d
        }

    }

    public KeyStrokesRenderer(Dragging dragging) {
        this.dragging = dragging;
    }
}

сс
когда не нажаты клавиши Посмотреть вложение 280866
когда нажаты все кроме спайса Посмотреть вложение 280867
не оч когда все нажаты
 
увидел что многие ставят либо хуйню которую спастили, либо хуйню которую сделали, по этому вот вам нормальные кейстрокесы, писал 15 минут
KeyStrokesRenderer:
Expand Collapse Copy
package ru.ancientmc.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import ru.ancientmc.events.EventDisplay;
import ru.ancientmc.functions.impl.render.HUD;
import ru.ancientmc.ui.display.ElementRenderer;
import ru.ancientmc.utils.drag.Dragging;
import ru.ancientmc.utils.math.StopWatch;
import ru.ancientmc.utils.math.Vector4i;
import ru.ancientmc.utils.render.ColorUtils;
import ru.ancientmc.utils.render.DisplayUtils;
import ru.ancientmc.utils.render.Scissor;
import ru.ancientmc.utils.render.font.Fonts;
import ru.ancientmc.utils.text.GradientUtil;
import net.minecraft.util.math.vector.Vector4f;
import net.minecraft.util.text.ITextComponent;

public class KeyStrokesRenderer implements ElementRenderer {
    private StopWatch time = new StopWatch();
    private final Dragging dragging;
    private float width;
    private float height;

    public void render(EventDisplay eventDisplay) {

        MatrixStack ms = eventDisplay.getMatrixStack();

        float posX = this.dragging.getX();
        float posY = this.dragging.getY();
        float padding = 3.0F;
        float font_size = 8.0F;
        float textPadding = 23.0F;

        String w = "W";
        String a = "A";
        String s = "S";
        String d = "D";
        String space = "SPACE";

        this.drawRect(posX, posY, this.width - 2.0F, this.height);

        Fonts.sfbold.drawCenteredText(ms, w, posX + 43, posY + padding - 25, ColorUtils.rgb(0,0,0), font_size);
        Fonts.sfbold.drawCenteredText(ms, a, posX - textPadding + 35, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, space, posX + 42, posY + 38.5F, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, s, posX + 43, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, d, posX + textPadding + 50, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );

        this.onClick(eventDisplay);
        float maxWidth = Fonts.sfMedium.getWidth(w, font_size) + padding * 2.0F;
        float localHeight = font_size + padding * 2.0F;

        Scissor.push();
        Scissor.setFromComponentCoordinates((double)posX, (double)posY, (double)(this.width - 2.0F), (double)this.height);
        Scissor.unset();
        Scissor.pop();

        this.width = Math.max(maxWidth, 80.0F);
        this.height = localHeight + 2.5F;
        this.dragging.setWidth(this.width);
        this.dragging.setHeight(this.height);
    }

    public void drawRect(float x, float y, float width, float height) {
        final Vector4i vector4i = new Vector4i(HUD.getColor(0, 1), HUD.getColor(0, 1), HUD.getColor(90, 1), HUD.getColor(90, 1));
        width = 28.0F;

        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawRoundedRect(x + 30, y, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//S

        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawRoundedRect(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//W

        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawRoundedRect(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(255, 255, 255, 255));//space

        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawRoundedRect(x, y, width, height + 10, 4, ColorUtils.rgba(255, 255, 255, 255));//A

        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawRoundedRect(x + 60, y, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//D


    }


    public void onClick(EventDisplay eventDisplay) {
        width = 28.0F;
        MatrixStack ms = eventDisplay.getMatrixStack();

        float posX = this.dragging.getX();
        float posY = this.dragging.getY();
        float x = this.dragging.getX();
        float y = this.dragging .getY();
        float font_size = 8.0F;
        if (mc.gameSettings.keyBindBack.pressed) {
            DisplayUtils.drawRoundedRect(x + 30,y,width,height + 10,4,ColorUtils.getColor(0));
            String s = "S";
            Fonts.sfbold.drawCenteredText(ms, s, posX + 43, posY + 9, ColorUtils.rgb(0,0,0), font_size ); //s
        }

        if (mc.gameSettings.keyBindJump.pressed) {
            DisplayUtils.drawRoundedRect(x,y + 30,width + 60,height + 7,4,ColorUtils.getColor(0));
            String space = "SPACE";
            Fonts.sfbold.drawCenteredText(ms, space, posX + 42, posY + 38.5F, ColorUtils.rgb(0,0,0), font_size );//space
        }

        if (mc.gameSettings.keyBindForward.pressed) {
            DisplayUtils.drawRoundedRect(x + 30,y - 30,width,height + 10,4,ColorUtils.getColor(0));
            String w = "W";
            Fonts.sfbold.drawCenteredText(ms, w, posX + 43, posY - 22   , ColorUtils.rgb(0,0,0), font_size);//w
        }

        if (mc.gameSettings.keyBindLeft.pressed) {
            DisplayUtils.drawRoundedRect(x,y,width,height + 10,4,ColorUtils.getColor(0));
            String a = "A";
            Fonts.sfbold.drawCenteredText(ms, a, posX + 12, posY + 9, ColorUtils.rgb(0,0,0), font_size );//a
        }

        if (mc.gameSettings.keyBindRight.pressed) {
            DisplayUtils.drawRoundedRect(x + 60,y,width,height + 10,4,ColorUtils.getColor(0));
            String d = "D";
            Fonts.sfbold.drawCenteredText(ms, d, posX + 73, posY + 9, ColorUtils.rgb(0,0,0), font_size );//d
        }

    }

    public KeyStrokesRenderer(Dragging dragging) {
        this.dragging = dragging;
    }
}

сс
когда не нажаты клавиши Посмотреть вложение 280866
когда нажаты все кроме спайса Посмотреть вложение 280867
а в чем тут норма?
 
увидел что многие ставят либо хуйню которую спастили, либо хуйню которую сделали, по этому вот вам нормальные кейстрокесы, писал 15 минут
KeyStrokesRenderer:
Expand Collapse Copy
package ru.ancientmc.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import ru.ancientmc.events.EventDisplay;
import ru.ancientmc.functions.impl.render.HUD;
import ru.ancientmc.ui.display.ElementRenderer;
import ru.ancientmc.utils.drag.Dragging;
import ru.ancientmc.utils.math.StopWatch;
import ru.ancientmc.utils.math.Vector4i;
import ru.ancientmc.utils.render.ColorUtils;
import ru.ancientmc.utils.render.DisplayUtils;
import ru.ancientmc.utils.render.Scissor;
import ru.ancientmc.utils.render.font.Fonts;
import ru.ancientmc.utils.text.GradientUtil;
import net.minecraft.util.math.vector.Vector4f;
import net.minecraft.util.text.ITextComponent;

public class KeyStrokesRenderer implements ElementRenderer {
    private StopWatch time = new StopWatch();
    private final Dragging dragging;
    private float width;
    private float height;

    public void render(EventDisplay eventDisplay) {

        MatrixStack ms = eventDisplay.getMatrixStack();

        float posX = this.dragging.getX();
        float posY = this.dragging.getY();
        float padding = 3.0F;
        float font_size = 8.0F;
        float textPadding = 23.0F;

        String w = "W";
        String a = "A";
        String s = "S";
        String d = "D";
        String space = "SPACE";

        this.drawRect(posX, posY, this.width - 2.0F, this.height);

        Fonts.sfbold.drawCenteredText(ms, w, posX + 43, posY + padding - 25, ColorUtils.rgb(0,0,0), font_size);
        Fonts.sfbold.drawCenteredText(ms, a, posX - textPadding + 35, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, space, posX + 42, posY + 38.5F, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, s, posX + 43, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );
        Fonts.sfbold.drawCenteredText(ms, d, posX + textPadding + 50, posY + padding + 6, ColorUtils.rgb(0,0,0), font_size );

        this.onClick(eventDisplay);
        float maxWidth = Fonts.sfMedium.getWidth(w, font_size) + padding * 2.0F;
        float localHeight = font_size + padding * 2.0F;

        Scissor.push();
        Scissor.setFromComponentCoordinates((double)posX, (double)posY, (double)(this.width - 2.0F), (double)this.height);
        Scissor.unset();
        Scissor.pop();

        this.width = Math.max(maxWidth, 80.0F);
        this.height = localHeight + 2.5F;
        this.dragging.setWidth(this.width);
        this.dragging.setHeight(this.height);
    }

    public void drawRect(float x, float y, float width, float height) {
        final Vector4i vector4i = new Vector4i(HUD.getColor(0, 1), HUD.getColor(0, 1), HUD.getColor(90, 1), HUD.getColor(90, 1));
        width = 28.0F;

        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawShadow(x + 30, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//S
        DisplayUtils.drawRoundedRect(x + 30, y, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//S

        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawShadow(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//W
        DisplayUtils.drawRoundedRect(x + 30, y - 30, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//W

        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawShadow(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(0, 0, 0, 255));//space
        DisplayUtils.drawRoundedRect(x, y + 30, width + 60, height + 7,4, ColorUtils.rgba(255, 255, 255, 255));//space

        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawShadow(x, y, width, height + 10, 4, ColorUtils.rgba(0, 0, 0, 255));//A
        DisplayUtils.drawRoundedRect(x, y, width, height + 10, 4, ColorUtils.rgba(255, 255, 255, 255));//A

        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawShadow(x + 60, y, width, height + 10,4, ColorUtils.rgba(0, 0, 0, 255));//D
        DisplayUtils.drawRoundedRect(x + 60, y, width, height + 10,4, ColorUtils.rgba(255, 255, 255, 255));//D


    }


    public void onClick(EventDisplay eventDisplay) {
        width = 28.0F;
        MatrixStack ms = eventDisplay.getMatrixStack();

        float posX = this.dragging.getX();
        float posY = this.dragging.getY();
        float x = this.dragging.getX();
        float y = this.dragging .getY();
        float font_size = 8.0F;
        if (mc.gameSettings.keyBindBack.pressed) {
            DisplayUtils.drawRoundedRect(x + 30,y,width,height + 10,4,ColorUtils.getColor(0));
            String s = "S";
            Fonts.sfbold.drawCenteredText(ms, s, posX + 43, posY + 9, ColorUtils.rgb(0,0,0), font_size ); //s
        }

        if (mc.gameSettings.keyBindJump.pressed) {
            DisplayUtils.drawRoundedRect(x,y + 30,width + 60,height + 7,4,ColorUtils.getColor(0));
            String space = "SPACE";
            Fonts.sfbold.drawCenteredText(ms, space, posX + 42, posY + 38.5F, ColorUtils.rgb(0,0,0), font_size );//space
        }

        if (mc.gameSettings.keyBindForward.pressed) {
            DisplayUtils.drawRoundedRect(x + 30,y - 30,width,height + 10,4,ColorUtils.getColor(0));
            String w = "W";
            Fonts.sfbold.drawCenteredText(ms, w, posX + 43, posY - 22   , ColorUtils.rgb(0,0,0), font_size);//w
        }

        if (mc.gameSettings.keyBindLeft.pressed) {
            DisplayUtils.drawRoundedRect(x,y,width,height + 10,4,ColorUtils.getColor(0));
            String a = "A";
            Fonts.sfbold.drawCenteredText(ms, a, posX + 12, posY + 9, ColorUtils.rgb(0,0,0), font_size );//a
        }

        if (mc.gameSettings.keyBindRight.pressed) {
            DisplayUtils.drawRoundedRect(x + 60,y,width,height + 10,4,ColorUtils.getColor(0));
            String d = "D";
            Fonts.sfbold.drawCenteredText(ms, d, posX + 73, posY + 9, ColorUtils.rgb(0,0,0), font_size );//d
        }

    }

    public KeyStrokesRenderer(Dragging dragging) {
        this.dragging = dragging;
    }
}

сс
когда не нажаты клавиши Посмотреть вложение 280866
когда нажаты все кроме спайса Посмотреть вложение 280867
а ведь за основу код мой взят, т.к лютый пастер фуриуса и ексо клиента не умеют сами писать)
 
Назад
Сверху Снизу