Исходник Pasta ArrayList | exp 3.1

Начинающий
Статус
Оффлайн
Регистрация
10 Фев 2023
Сообщения
348
Реакции[?]
0
Поинты[?]
1K

Перед прочтением основного контента ниже, пожалуйста, обратите внимание на обновление внутри секции Майна на нашем форуме. У нас появились:

  • бесплатные читы для Майнкрафт — любое использование на свой страх и риск;
  • маркетплейс Майнкрафт — абсолютно любая коммерция, связанная с игрой, за исключением продажи читов (аккаунты, предоставления услуг, поиск кодеров читов и так далее);
  • приватные читы для Minecraft — в этом разделе только платные хаки для игры, покупайте группу "Продавец" и выставляйте на продажу свой софт;
  • обсуждения и гайды — всё тот же раздел с вопросами, но теперь модернизированный: поиск нужных хаков, пати с игроками-читерами и другая полезная информация.

Спасибо!

ну может надо кому то
"быстро спастил и ушел называется селфкод)"

Java:
package pasta.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import pasta.paster;
import pasta.events.EventDisplay;
import pasta.events.EventUpdate;
import pasta.functions.api.Category;
import pasta.functions.api.Function;
import pasta.ui.display.ElementRenderer;
import pasta.ui.display.ElementUpdater;
import pasta.utils.math.StopWatch;
import pasta.utils.render.ColorUtils;
import pasta.utils.render.RenderUtils;
import pasta.utils.render.font.Fonts;
import net.minecraft.util.math.vector.Vector4f;
import ru.hogoshi.Animation;

import java.util.List;

public class ArrayListRenderer implements ElementRenderer, ElementUpdater {

    private int lastIndex;

    List<Function> list;


    StopWatch stopWatch = new StopWatch();

    @Override
    public void update(EventUpdate e) {
        if (stopWatch.isReached(1000)) {
            list = waithware.getInstance().getFunctionRegistry().getSorted(Fonts.sfui, 9 - 1.5f)
                    .stream()
                    .filter(m -> m.getCategory() != Category.Render)
                    .toList();
            stopWatch.reset();
        }
    }

    @Override
    public void render(EventDisplay eventDisplay) {
        MatrixStack ms = eventDisplay.getMatrixStack();
        float rounding = 4;
        float padding = 1.5f;
        float posX = 4;
        float posY = 4 + 28;
        int index = 0;
        if (list == null) return;
        for (Function f : list) {
            float fontSize = 6.5f;
            Animation anim = f.getAnimation();
            float value = (float) anim.getValue();
            String text = f.getName();
            float textWidth = Fonts.sfui.getWidth(text, fontSize);
            if (value != 0) {
                float localFontSize = fontSize * value;
                float localTextWidth = textWidth * value;
                posY += (fontSize + padding * 3) * value;
                index++;
            }
        }

        index = 0;
        posY = 4 + 28;
        for (Function f : list) {
            float fontSize = 6.5f;
            Animation anim = f.getAnimation();
            anim.update();
            float value = (float) anim.getValue();
            String text = f.getName();
            float textWidth = Fonts.sfui.getWidth(text, fontSize);
            if (value != 0) {
                float localFontSize = fontSize * value;
                float localTextWidth = textWidth + value;
                boolean isFirst = index == 0;
                boolean isLast = index == lastIndex;
                float localRounding = rounding;
                for (Function f2 : list.subList(list.indexOf(f) + 1, list.size())) { // predict next active module
                    if (f2.getAnimation().getValue() != 0) {
                        localRounding = isLast ? rounding : Math.min(textWidth - Fonts.sfui.getWidth(f2.getName(), fontSize), rounding);
                        break;
                    }
                }

                Vector4f rectVec = new Vector4f(isFirst ? rounding : 0, isLast ? rounding : 0, isFirst ? rounding : 0, isLast ? rounding : localRounding);
                RenderUtils.renderClientRect(ms, posX, posY, localTextWidth + padding * 3, localFontSize + padding + 6,  false, 0);
//                DisplayUtils.drawRoundedRect(posX, posY, localTextWidth + padding * 3, localFontSize + padding + 6,  4, ColorUtils.setAlpha(ColorUtils.rgb(21,24,40), 90));
//                DisplayUtils.drawRoundedRect(posX, posY, localTextWidth + padding * 3, localFontSize + padding + 6, 4, ColorUtils.rgba(21, 24, 40,90));
                Fonts.sfui.drawText(ms, f.getName(), posX + padding + 0.3f, posY + padding + 2, ColorUtils.rgba(255,255,255,255), localFontSize);
                posY += (fontSize + padding + 8) * value;
                index++;
            }
        }

        lastIndex = index - 1;
    }
}
ss:Desktop Screenshot 2024.09.25 - 11.20.28.22.png
 
Начинающий
Статус
Оффлайн
Регистрация
15 Сен 2024
Сообщения
35
Реакции[?]
0
Поинты[?]
0
ну может надо кому то
"быстро спастил и ушел называется селфкод)"

Java:
package pasta.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import pasta.paster;
import pasta.events.EventDisplay;
import pasta.events.EventUpdate;
import pasta.functions.api.Category;
import pasta.functions.api.Function;
import pasta.ui.display.ElementRenderer;
import pasta.ui.display.ElementUpdater;
import pasta.utils.math.StopWatch;
import pasta.utils.render.ColorUtils;
import pasta.utils.render.RenderUtils;
import pasta.utils.render.font.Fonts;
import net.minecraft.util.math.vector.Vector4f;
import ru.hogoshi.Animation;

import java.util.List;

public class ArrayListRenderer implements ElementRenderer, ElementUpdater {

    private int lastIndex;

    List<Function> list;


    StopWatch stopWatch = new StopWatch();

    @Override
    public void update(EventUpdate e) {
        if (stopWatch.isReached(1000)) {
            list = waithware.getInstance().getFunctionRegistry().getSorted(Fonts.sfui, 9 - 1.5f)
                    .stream()
                    .filter(m -> m.getCategory() != Category.Render)
                    .toList();
            stopWatch.reset();
        }
    }

    @Override
    public void render(EventDisplay eventDisplay) {
        MatrixStack ms = eventDisplay.getMatrixStack();
        float rounding = 4;
        float padding = 1.5f;
        float posX = 4;
        float posY = 4 + 28;
        int index = 0;
        if (list == null) return;
        for (Function f : list) {
            float fontSize = 6.5f;
            Animation anim = f.getAnimation();
            float value = (float) anim.getValue();
            String text = f.getName();
            float textWidth = Fonts.sfui.getWidth(text, fontSize);
            if (value != 0) {
                float localFontSize = fontSize * value;
                float localTextWidth = textWidth * value;
                posY += (fontSize + padding * 3) * value;
                index++;
            }
        }

        index = 0;
        posY = 4 + 28;
        for (Function f : list) {
            float fontSize = 6.5f;
            Animation anim = f.getAnimation();
            anim.update();
            float value = (float) anim.getValue();
            String text = f.getName();
            float textWidth = Fonts.sfui.getWidth(text, fontSize);
            if (value != 0) {
                float localFontSize = fontSize * value;
                float localTextWidth = textWidth + value;
                boolean isFirst = index == 0;
                boolean isLast = index == lastIndex;
                float localRounding = rounding;
                for (Function f2 : list.subList(list.indexOf(f) + 1, list.size())) { // predict next active module
                    if (f2.getAnimation().getValue() != 0) {
                        localRounding = isLast ? rounding : Math.min(textWidth - Fonts.sfui.getWidth(f2.getName(), fontSize), rounding);
                        break;
                    }
                }

                Vector4f rectVec = new Vector4f(isFirst ? rounding : 0, isLast ? rounding : 0, isFirst ? rounding : 0, isLast ? rounding : localRounding);
                RenderUtils.renderClientRect(ms, posX, posY, localTextWidth + padding * 3, localFontSize + padding + 6,  false, 0);
//                DisplayUtils.drawRoundedRect(posX, posY, localTextWidth + padding * 3, localFontSize + padding + 6,  4, ColorUtils.setAlpha(ColorUtils.rgb(21,24,40), 90));
//                DisplayUtils.drawRoundedRect(posX, posY, localTextWidth + padding * 3, localFontSize + padding + 6, 4, ColorUtils.rgba(21, 24, 40,90));
                Fonts.sfui.drawText(ms, f.getName(), posX + padding + 0.3f, posY + padding + 2, ColorUtils.rgba(255,255,255,255), localFontSize);
                posY += (fontSize + padding + 8) * value;
                index++;
            }
        }

        lastIndex = index - 1;
    }
}
ss:Посмотреть вложение 286440
/del хуйня
 
Начинающий
Статус
Онлайн
Регистрация
10 Июл 2023
Сообщения
149
Реакции[?]
0
Поинты[?]
0
ну может надо кому то
"быстро спастил и ушел называется селфкод)"

Java:
package pasta.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import pasta.paster;
import pasta.events.EventDisplay;
import pasta.events.EventUpdate;
import pasta.functions.api.Category;
import pasta.functions.api.Function;
import pasta.ui.display.ElementRenderer;
import pasta.ui.display.ElementUpdater;
import pasta.utils.math.StopWatch;
import pasta.utils.render.ColorUtils;
import pasta.utils.render.RenderUtils;
import pasta.utils.render.font.Fonts;
import net.minecraft.util.math.vector.Vector4f;
import ru.hogoshi.Animation;

import java.util.List;

public class ArrayListRenderer implements ElementRenderer, ElementUpdater {

    private int lastIndex;

    List<Function> list;


    StopWatch stopWatch = new StopWatch();

    @Override
    public void update(EventUpdate e) {
        if (stopWatch.isReached(1000)) {
            list = waithware.getInstance().getFunctionRegistry().getSorted(Fonts.sfui, 9 - 1.5f)
                    .stream()
                    .filter(m -> m.getCategory() != Category.Render)
                    .toList();
            stopWatch.reset();
        }
    }

    @Override
    public void render(EventDisplay eventDisplay) {
        MatrixStack ms = eventDisplay.getMatrixStack();
        float rounding = 4;
        float padding = 1.5f;
        float posX = 4;
        float posY = 4 + 28;
        int index = 0;
        if (list == null) return;
        for (Function f : list) {
            float fontSize = 6.5f;
            Animation anim = f.getAnimation();
            float value = (float) anim.getValue();
            String text = f.getName();
            float textWidth = Fonts.sfui.getWidth(text, fontSize);
            if (value != 0) {
                float localFontSize = fontSize * value;
                float localTextWidth = textWidth * value;
                posY += (fontSize + padding * 3) * value;
                index++;
            }
        }

        index = 0;
        posY = 4 + 28;
        for (Function f : list) {
            float fontSize = 6.5f;
            Animation anim = f.getAnimation();
            anim.update();
            float value = (float) anim.getValue();
            String text = f.getName();
            float textWidth = Fonts.sfui.getWidth(text, fontSize);
            if (value != 0) {
                float localFontSize = fontSize * value;
                float localTextWidth = textWidth + value;
                boolean isFirst = index == 0;
                boolean isLast = index == lastIndex;
                float localRounding = rounding;
                for (Function f2 : list.subList(list.indexOf(f) + 1, list.size())) { // predict next active module
                    if (f2.getAnimation().getValue() != 0) {
                        localRounding = isLast ? rounding : Math.min(textWidth - Fonts.sfui.getWidth(f2.getName(), fontSize), rounding);
                        break;
                    }
                }

                Vector4f rectVec = new Vector4f(isFirst ? rounding : 0, isLast ? rounding : 0, isFirst ? rounding : 0, isLast ? rounding : localRounding);
                RenderUtils.renderClientRect(ms, posX, posY, localTextWidth + padding * 3, localFontSize + padding + 6,  false, 0);
//                DisplayUtils.drawRoundedRect(posX, posY, localTextWidth + padding * 3, localFontSize + padding + 6,  4, ColorUtils.setAlpha(ColorUtils.rgb(21,24,40), 90));
//                DisplayUtils.drawRoundedRect(posX, posY, localTextWidth + padding * 3, localFontSize + padding + 6, 4, ColorUtils.rgba(21, 24, 40,90));
                Fonts.sfui.drawText(ms, f.getName(), posX + padding + 0.3f, posY + padding + 2, ColorUtils.rgba(255,255,255,255), localFontSize);
                posY += (fontSize + padding + 8) * value;
                index++;
            }
        }

        lastIndex = index - 1;
    }
}
ss:Посмотреть вложение 286440
/del это не твое даже а от сюда " Бля это джерк или дейтройт хз "
 
Начинающий
Статус
Оффлайн
Регистрация
6 Авг 2024
Сообщения
3
Реакции[?]
0
Поинты[?]
0
ну может надо кому то
"быстро спастил и ушел называется селфкод)"

Java:
package pasta.ui.display.impl;

import com.mojang.blaze3d.matrix.MatrixStack;
import pasta.paster;
import pasta.events.EventDisplay;
import pasta.events.EventUpdate;
import pasta.functions.api.Category;
import pasta.functions.api.Function;
import pasta.ui.display.ElementRenderer;
import pasta.ui.display.ElementUpdater;
import pasta.utils.math.StopWatch;
import pasta.utils.render.ColorUtils;
import pasta.utils.render.RenderUtils;
import pasta.utils.render.font.Fonts;
import net.minecraft.util.math.vector.Vector4f;
import ru.hogoshi.Animation;

import java.util.List;

public class ArrayListRenderer implements ElementRenderer, ElementUpdater {

    private int lastIndex;

    List<Function> list;


    StopWatch stopWatch = new StopWatch();

    @Override
    public void update(EventUpdate e) {
        if (stopWatch.isReached(1000)) {
            list = waithware.getInstance().getFunctionRegistry().getSorted(Fonts.sfui, 9 - 1.5f)
                    .stream()
                    .filter(m -> m.getCategory() != Category.Render)
                    .toList();
            stopWatch.reset();
        }
    }

    @Override
    public void render(EventDisplay eventDisplay) {
        MatrixStack ms = eventDisplay.getMatrixStack();
        float rounding = 4;
        float padding = 1.5f;
        float posX = 4;
        float posY = 4 + 28;
        int index = 0;
        if (list == null) return;
        for (Function f : list) {
            float fontSize = 6.5f;
            Animation anim = f.getAnimation();
            float value = (float) anim.getValue();
            String text = f.getName();
            float textWidth = Fonts.sfui.getWidth(text, fontSize);
            if (value != 0) {
                float localFontSize = fontSize * value;
                float localTextWidth = textWidth * value;
                posY += (fontSize + padding * 3) * value;
                index++;
            }
        }

        index = 0;
        posY = 4 + 28;
        for (Function f : list) {
            float fontSize = 6.5f;
            Animation anim = f.getAnimation();
            anim.update();
            float value = (float) anim.getValue();
            String text = f.getName();
            float textWidth = Fonts.sfui.getWidth(text, fontSize);
            if (value != 0) {
                float localFontSize = fontSize * value;
                float localTextWidth = textWidth + value;
                boolean isFirst = index == 0;
                boolean isLast = index == lastIndex;
                float localRounding = rounding;
                for (Function f2 : list.subList(list.indexOf(f) + 1, list.size())) { // predict next active module
                    if (f2.getAnimation().getValue() != 0) {
                        localRounding = isLast ? rounding : Math.min(textWidth - Fonts.sfui.getWidth(f2.getName(), fontSize), rounding);
                        break;
                    }
                }

                Vector4f rectVec = new Vector4f(isFirst ? rounding : 0, isLast ? rounding : 0, isFirst ? rounding : 0, isLast ? rounding : localRounding);
                RenderUtils.renderClientRect(ms, posX, posY, localTextWidth + padding * 3, localFontSize + padding + 6,  false, 0);
//                DisplayUtils.drawRoundedRect(posX, posY, localTextWidth + padding * 3, localFontSize + padding + 6,  4, ColorUtils.setAlpha(ColorUtils.rgb(21,24,40), 90));
//                DisplayUtils.drawRoundedRect(posX, posY, localTextWidth + padding * 3, localFontSize + padding + 6, 4, ColorUtils.rgba(21, 24, 40,90));
                Fonts.sfui.drawText(ms, f.getName(), posX + padding + 0.3f, posY + padding + 2, ColorUtils.rgba(255,255,255,255), localFontSize);
                posY += (fontSize + padding + 8) * value;
                index++;
            }
        }

        lastIndex = index - 1;
    }
}
ss:Посмотреть вложение 286440
ну норм для фри чита норм
 
Сверху Снизу