Туториал на эллементы худа функцией | exp 3.1

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
26 Фев 2024
Сообщения
454
Реакции
1
подробнее - у нас в функциях есть HUD, в котором лежит хуйня - ватермарка, таргетхуд и тд, а мы сделаем так, чтобы ватермарка таргет худ и тд были просто функцией

вот 1000iq код (переделанный худ)
1. Создаем в рендере класс Watermark
2. Вставляем туда код
watermark:
Expand Collapse Copy
package ru.ancientmc.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import ru.ancientmc.Expensive;
import ru.ancientmc.events.EventDisplay;
import ru.ancientmc.events.EventUpdate;
import ru.ancientmc.functions.api.Category;
import ru.ancientmc.functions.api.Function;
import ru.ancientmc.functions.api.FunctionRegister;
import ru.ancientmc.functions.settings.impl.BooleanSetting;
import ru.ancientmc.functions.settings.impl.ModeListSetting;
import ru.ancientmc.ui.display.impl.*;
import ru.ancientmc.ui.styles.StyleManager;
import ru.ancientmc.utils.render.ColorUtils;
import lombok.AccessLevel;
import lombok.experimental.FieldDefaults;

@FieldDefaults(level = AccessLevel.PRIVATE)
@FunctionRegister(name = "Watermark", type = Category.Render)
public class Watermark extends Function {

    private final ModeListSetting elements = new ModeListSetting("Элементы",
            new BooleanSetting("Старая", false),
            new BooleanSetting("Новая", true)
    );

    final OldWatermarkRenderer oldWatermarkRenderer;
    final WatermarkRenderer watermarkRenderer;

    @Subscribe
    private void onUpdate(EventUpdate e) {
        if (mc.gameSettings.showDebugInfo) {
            return;
        }
    }


    @Subscribe
    private void onDisplay(EventDisplay e) {
        if (mc.gameSettings.showDebugInfo || e.getType() != EventDisplay.Type.POST) {
            return;
        }

        if (elements.getValueByName("Старая").get()) oldWatermarkRenderer.render(e);
        if (elements.getValueByName("Новая").get()) watermarkRenderer.render(e);

    }

    public Watermark() {
        oldWatermarkRenderer = new OldWatermarkRenderer();
        watermarkRenderer = new WatermarkRenderer();
        addSettings(elements);
    }

    @Override
    public void updateEntity() {

    }

    public static int getColor(int index) {
        StyleManager styleManager = Expensive.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), index * 16, 10);
    }

    public static int getColor(int index, float mult) {
        StyleManager styleManager = Expensive.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), (int) (index * mult), 10);
    }

    public static int getColor(int firstColor, int secondColor, int index, float mult) {
        return ColorUtils.gradient(firstColor, secondColor, (int) (index * mult), 10);
    }
}
регаем в функтион регистере
готово!
 
Последнее редактирование:
подробнее - у нас в функциях есть HUD, в котором лежит вся хуйня по типу ватермарков таргетхудов и тд, а мы сделаем так, чтобы ватермарки таргетхуды и тд просто были функциями

вот 1000iq код (переделанный худ)
1. Создаем в рендере класс Watermark
2. Вставляем туда код
watermark:
Expand Collapse Copy
package ru.ancientmc.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import ru.ancientmc.Expensive;
import ru.ancientmc.events.EventDisplay;
import ru.ancientmc.events.EventUpdate;
import ru.ancientmc.functions.api.Category;
import ru.ancientmc.functions.api.Function;
import ru.ancientmc.functions.api.FunctionRegister;
import ru.ancientmc.functions.settings.impl.BooleanSetting;
import ru.ancientmc.functions.settings.impl.ModeListSetting;
import ru.ancientmc.ui.display.impl.*;
import ru.ancientmc.ui.styles.StyleManager;
import ru.ancientmc.utils.render.ColorUtils;
import lombok.AccessLevel;
import lombok.experimental.FieldDefaults;

@FieldDefaults(level = AccessLevel.PRIVATE)
@FunctionRegister(name = "Watermark", type = Category.Render)
public class Watermark extends Function {

    private final ModeListSetting elements = new ModeListSetting("Элементы",
            new BooleanSetting("Старая", false),
            new BooleanSetting("Новая", true)
    );

    final OldWatermarkRenderer oldWatermarkRenderer;
    final WatermarkRenderer watermarkRenderer;

    @Subscribe
    private void onUpdate(EventUpdate e) {
        if (mc.gameSettings.showDebugInfo) {
            return;
        }
    }


    @Subscribe
    private void onDisplay(EventDisplay e) {
        if (mc.gameSettings.showDebugInfo || e.getType() != EventDisplay.Type.POST) {
            return;
        }

        if (elements.getValueByName("Старая").get()) oldWatermarkRenderer.render(e);
        if (elements.getValueByName("Новая").get()) watermarkRenderer.render(e);

    }

    public Watermark() {
        oldWatermarkRenderer = new OldWatermarkRenderer();
        watermarkRenderer = new WatermarkRenderer();
        addSettings(elements);
    }

    @Override
    public void updateEntity() {

    }

    public static int getColor(int index) {
        StyleManager styleManager = Expensive.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), index * 16, 10);
    }

    public static int getColor(int index, float mult) {
        StyleManager styleManager = Expensive.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), (int) (index * mult), 10);
    }

    public static int getColor(int firstColor, int secondColor, int index, float mult) {
        return ColorUtils.gradient(firstColor, secondColor, (int) (index * mult), 10);
    }
}
регаем в функтион регистере
готово!
 
подробнее - у нас в функциях есть HUD, в котором лежит хуйня - ватермарка, а мы сделаем так, чтобы ватермарка просто была функцией

вот 1000iq код (переделанный худ)
1. Создаем в рендере класс Watermark
2. Вставляем туда код
watermark:
Expand Collapse Copy
package ru.ancientmc.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import ru.ancientmc.Expensive;
import ru.ancientmc.events.EventDisplay;
import ru.ancientmc.events.EventUpdate;
import ru.ancientmc.functions.api.Category;
import ru.ancientmc.functions.api.Function;
import ru.ancientmc.functions.api.FunctionRegister;
import ru.ancientmc.functions.settings.impl.BooleanSetting;
import ru.ancientmc.functions.settings.impl.ModeListSetting;
import ru.ancientmc.ui.display.impl.*;
import ru.ancientmc.ui.styles.StyleManager;
import ru.ancientmc.utils.render.ColorUtils;
import lombok.AccessLevel;
import lombok.experimental.FieldDefaults;

@FieldDefaults(level = AccessLevel.PRIVATE)
@FunctionRegister(name = "Watermark", type = Category.Render)
public class Watermark extends Function {

    private final ModeListSetting elements = new ModeListSetting("Элементы",
            new BooleanSetting("Старая", false),
            new BooleanSetting("Новая", true)
    );

    final OldWatermarkRenderer oldWatermarkRenderer;
    final WatermarkRenderer watermarkRenderer;

    @Subscribe
    private void onUpdate(EventUpdate e) {
        if (mc.gameSettings.showDebugInfo) {
            return;
        }
    }


    @Subscribe
    private void onDisplay(EventDisplay e) {
        if (mc.gameSettings.showDebugInfo || e.getType() != EventDisplay.Type.POST) {
            return;
        }

        if (elements.getValueByName("Старая").get()) oldWatermarkRenderer.render(e);
        if (elements.getValueByName("Новая").get()) watermarkRenderer.render(e);

    }

    public Watermark() {
        oldWatermarkRenderer = new OldWatermarkRenderer();
        watermarkRenderer = new WatermarkRenderer();
        addSettings(elements);
    }

    @Override
    public void updateEntity() {

    }

    public static int getColor(int index) {
        StyleManager styleManager = Expensive.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), index * 16, 10);
    }

    public static int getColor(int index, float mult) {
        StyleManager styleManager = Expensive.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), (int) (index * mult), 10);
    }

    public static int getColor(int firstColor, int secondColor, int index, float mult) {
        return ColorUtils.gradient(firstColor, secondColor, (int) (index * mult), 10);
    }
}
регаем в функтион регистере
готово!
ВАЖНО !!! РАБОТАЕТ ТОЛЬКО НА ВАТЕРМАРКУ !!!
ап
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
подробнее - у нас в функциях есть HUD, в котором лежит хуйня - ватермарка, а мы сделаем так, чтобы ватермарка просто была функцией

вот 1000iq код (переделанный худ)
1. Создаем в рендере класс Watermark
2. Вставляем туда код
watermark:
Expand Collapse Copy
package ru.ancientmc.functions.impl.render;

import com.google.common.eventbus.Subscribe;
import ru.ancientmc.Expensive;
import ru.ancientmc.events.EventDisplay;
import ru.ancientmc.events.EventUpdate;
import ru.ancientmc.functions.api.Category;
import ru.ancientmc.functions.api.Function;
import ru.ancientmc.functions.api.FunctionRegister;
import ru.ancientmc.functions.settings.impl.BooleanSetting;
import ru.ancientmc.functions.settings.impl.ModeListSetting;
import ru.ancientmc.ui.display.impl.*;
import ru.ancientmc.ui.styles.StyleManager;
import ru.ancientmc.utils.render.ColorUtils;
import lombok.AccessLevel;
import lombok.experimental.FieldDefaults;

@FieldDefaults(level = AccessLevel.PRIVATE)
@FunctionRegister(name = "Watermark", type = Category.Render)
public class Watermark extends Function {

    private final ModeListSetting elements = new ModeListSetting("Элементы",
            new BooleanSetting("Старая", false),
            new BooleanSetting("Новая", true)
    );

    final OldWatermarkRenderer oldWatermarkRenderer;
    final WatermarkRenderer watermarkRenderer;

    @Subscribe
    private void onUpdate(EventUpdate e) {
        if (mc.gameSettings.showDebugInfo) {
            return;
        }
    }


    @Subscribe
    private void onDisplay(EventDisplay e) {
        if (mc.gameSettings.showDebugInfo || e.getType() != EventDisplay.Type.POST) {
            return;
        }

        if (elements.getValueByName("Старая").get()) oldWatermarkRenderer.render(e);
        if (elements.getValueByName("Новая").get()) watermarkRenderer.render(e);

    }

    public Watermark() {
        oldWatermarkRenderer = new OldWatermarkRenderer();
        watermarkRenderer = new WatermarkRenderer();
        addSettings(elements);
    }

    @Override
    public void updateEntity() {

    }

    public static int getColor(int index) {
        StyleManager styleManager = Expensive.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), index * 16, 10);
    }

    public static int getColor(int index, float mult) {
        StyleManager styleManager = Expensive.getInstance().getStyleManager();
        return ColorUtils.gradient(styleManager.getCurrentStyle().getFirstColor().getRGB(), styleManager.getCurrentStyle().getSecondColor().getRGB(), (int) (index * mult), 10);
    }

    public static int getColor(int firstColor, int secondColor, int index, float mult) {
        return ColorUtils.gradient(firstColor, secondColor, (int) (index * mult), 10);
    }
}
регаем в функтион регистере
готово!
ВАЖНО !!! РАБОТАЕТ ТОЛЬКО НА ВАТЕРМАРКУ !!!
работает на все
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Назад
Сверху Снизу