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

Notification nursultan nextgen(Expensive 2.0 ready)

  • Автор темы Автор темы FolseYT
  • Дата начала Дата начала
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
к сожалению не перехожу на дс сервера )))
тогда попрошу все же перестать пользоваться кнопкой
1700465208600.png
, пока на твоем спидометре
1700465232056.png
не набралась критическая скорость инвалидной коляски при которой колеса поедут отдельно от тушки
 
так вроде ты на инвалидной коляске ездиешь,ну ладно))
1700465632789.png

как же я вас ненавижу)))
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Посмотреть вложение 264177
как же я вас ненавижу)))
долго видно делал)
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Java:
Expand Collapse Copy
package ru.nettix.notification;

import com.mojang.blaze3d.matrix.MatrixStack;
import lombok.Getter;
import lombok.Setter;
import net.minecraft.potion.EffectInstance;
import net.minecraft.util.math.vector.Vector4f;
import ru.nettix.managment.Managment;
import ru.nettix.util.font.Fonts;
import ru.nettix.util.render.ColorUtil;
import ru.nettix.util.render.RenderUtil;
import ru.nettix.util.animations.Animation;
import ru.nettix.util.animations.Direction;
import ru.nettix.util.animations.impl.DecelerateAnimation;
import ru.nettix.util.render.animation.AnimationMath;

import java.util.Comparator;
import java.util.concurrent.CopyOnWriteArrayList;

import static ru.nettix.util.IMinecraft.mc;
import static ru.nettix.util.render.ColorUtil.getColorStyle;
import static ru.nettix.util.render.ColorUtil.rgba;

public class NotificationManager {

    private final CopyOnWriteArrayList<Notification> notifications = new CopyOnWriteArrayList<>();

    public void add(String text, String content, int time) {
        notifications.add(new Notification(text, content, time));
    }


    public void draw(MatrixStack stack) {
        int yOffset = 0;
        for (Notification notification : notifications) {

            if (System.currentTimeMillis() - notification.getTime() > (notification.time2 * 1000L) - 300) {
                notification.animation.setDirection(Direction.BACKWARDS);
            } else {
                notification.yAnimation.setDirection(Direction.FORWARDS);
                notification.animation.setDirection(Direction.FORWARDS);
            }
            notification.alpha = (float) notification.animation.getOutput();
            if (System.currentTimeMillis() - notification.getTime() > notification.time2 * 1000L) {
                notification.yAnimation.setDirection(Direction.BACKWARDS);
            }
            if (notification.yAnimation.finished(Direction.BACKWARDS)) {
                notifications.remove(notification);
                continue;
            }
            float x = mc.getMainWindow().scaledWidth() - (Fonts.gilroyBold[14].getWidth(notification.getText()) + 8) - 10;
            float y = mc.getMainWindow().scaledHeight() - 30 -  (mc.player.getActivePotionEffects().stream().sorted(Comparator.comparing(EffectInstance::getDuration)).toList().size() * 16);
            notification.yAnimation.setEndPoint(yOffset);
            notification.yAnimation.setDuration(300);
            y -= (float) (notification.draw(stack) * notification.yAnimation.getOutput());
            notification.setX(x);
            notification.setY(AnimationMath.fast(notification.getY(), y, 15));
            yOffset++;
        }
    }


    private class Notification {
        @Getter
        @Setter
        private float x, y = mc.getMainWindow().scaledHeight() + 24;

        @Getter
        private String text;
        @Getter
        private String content;

        @Getter
        private long time = System.currentTimeMillis();

        public Animation animation = new DecelerateAnimation(500, 1, Direction.FORWARDS);
        public Animation yAnimation = new DecelerateAnimation(500, 1, Direction.FORWARDS);
        float alpha;
        int time2 = 3;

        public Notification(String text, String content, int time) {
            this.text = text;
            this.content = content;
            time2 = time;
        }

        public float draw(MatrixStack stack) {
            float width = Fonts.gilroyBold[14].getWidth(text) + 8;

            int firstColor = RenderUtil.reAlphaInt(Managment.STYLE_MANAGER.getCurrentStyle().getColor(0), (int) (255 * alpha));
            int secondColor = RenderUtil.reAlphaInt(Managment.STYLE_MANAGER.getCurrentStyle().getColor(100), (int) (255 * alpha));
            int thirdColor = RenderUtil.reAlphaInt(Managment.STYLE_MANAGER.getCurrentStyle().getColor(0), (int) (255 * alpha));
            int fourthColor = RenderUtil.reAlphaInt(Managment.STYLE_MANAGER.getCurrentStyle().getColor(100), (int) (255 * alpha));

            if (Managment.FUNCTION_MANAGER.hud2.shadow.get())
                RenderUtil.Render2D.drawShadow(x - 30, y, width + 30, 20, 10, getColorStyle(40));
            RenderUtil.Render2D.drawRoundedRect(x - 30, y, width + 30, 20, 3, ColorUtil.rgba(0, 0, 0, 255 * alpha));

            Fonts.msMedium[14].drawString(stack, content, x + 4 - 30, y + 5, RenderUtil.reAlphaInt(-1, (int) (255 * alpha)));
            Fonts.msMedium[12].drawString(stack, text, x + 4 - 30, y + 13, RenderUtil.reAlphaInt(-1, (int) (255 * alpha)));
            return 24;
        }
    }
}
Оригинал:Посмотреть вложение 264128
Моё: Посмотреть вложение 264129
Только не бейте палками пж
шрифт sf bold поставь и прозрачнее черный фон сделай
 
Последнее редактирование:
Java:
Expand Collapse Copy
package ru.nettix.notification;

import com.mojang.blaze3d.matrix.MatrixStack;
import lombok.Getter;
import lombok.Setter;
import net.minecraft.potion.EffectInstance;
import net.minecraft.util.math.vector.Vector4f;
import ru.nettix.managment.Managment;
import ru.nettix.util.font.Fonts;
import ru.nettix.util.render.ColorUtil;
import ru.nettix.util.render.RenderUtil;
import ru.nettix.util.animations.Animation;
import ru.nettix.util.animations.Direction;
import ru.nettix.util.animations.impl.DecelerateAnimation;
import ru.nettix.util.render.animation.AnimationMath;

import java.util.Comparator;
import java.util.concurrent.CopyOnWriteArrayList;

import static ru.nettix.util.IMinecraft.mc;
import static ru.nettix.util.render.ColorUtil.getColorStyle;
import static ru.nettix.util.render.ColorUtil.rgba;

public class NotificationManager {

    private final CopyOnWriteArrayList<Notification> notifications = new CopyOnWriteArrayList<>();

    public void add(String text, String content, int time) {
        notifications.add(new Notification(text, content, time));
    }


    public void draw(MatrixStack stack) {
        int yOffset = 0;
        for (Notification notification : notifications) {

            if (System.currentTimeMillis() - notification.getTime() > (notification.time2 * 1000L) - 300) {
                notification.animation.setDirection(Direction.BACKWARDS);
            } else {
                notification.yAnimation.setDirection(Direction.FORWARDS);
                notification.animation.setDirection(Direction.FORWARDS);
            }
            notification.alpha = (float) notification.animation.getOutput();
            if (System.currentTimeMillis() - notification.getTime() > notification.time2 * 1000L) {
                notification.yAnimation.setDirection(Direction.BACKWARDS);
            }
            if (notification.yAnimation.finished(Direction.BACKWARDS)) {
                notifications.remove(notification);
                continue;
            }
            float x = mc.getMainWindow().scaledWidth() - (Fonts.gilroyBold[14].getWidth(notification.getText()) + 8) - 10;
            float y = mc.getMainWindow().scaledHeight() - 30 -  (mc.player.getActivePotionEffects().stream().sorted(Comparator.comparing(EffectInstance::getDuration)).toList().size() * 16);
            notification.yAnimation.setEndPoint(yOffset);
            notification.yAnimation.setDuration(300);
            y -= (float) (notification.draw(stack) * notification.yAnimation.getOutput());
            notification.setX(x);
            notification.setY(AnimationMath.fast(notification.getY(), y, 15));
            yOffset++;
        }
    }


    private class Notification {
        @Getter
        @Setter
        private float x, y = mc.getMainWindow().scaledHeight() + 24;

        @Getter
        private String text;
        @Getter
        private String content;

        @Getter
        private long time = System.currentTimeMillis();

        public Animation animation = new DecelerateAnimation(500, 1, Direction.FORWARDS);
        public Animation yAnimation = new DecelerateAnimation(500, 1, Direction.FORWARDS);
        float alpha;
        int time2 = 3;

        public Notification(String text, String content, int time) {
            this.text = text;
            this.content = content;
            time2 = time;
        }

        public float draw(MatrixStack stack) {
            float width = Fonts.gilroyBold[14].getWidth(text) + 8;

            int firstColor = RenderUtil.reAlphaInt(Managment.STYLE_MANAGER.getCurrentStyle().getColor(0), (int) (255 * alpha));
            int secondColor = RenderUtil.reAlphaInt(Managment.STYLE_MANAGER.getCurrentStyle().getColor(100), (int) (255 * alpha));
            int thirdColor = RenderUtil.reAlphaInt(Managment.STYLE_MANAGER.getCurrentStyle().getColor(0), (int) (255 * alpha));
            int fourthColor = RenderUtil.reAlphaInt(Managment.STYLE_MANAGER.getCurrentStyle().getColor(100), (int) (255 * alpha));

            if (Managment.FUNCTION_MANAGER.hud2.shadow.get())
                RenderUtil.Render2D.drawShadow(x - 30, y, width + 30, 20, 10, getColorStyle(40));
            RenderUtil.Render2D.drawRoundedRect(x - 30, y, width + 30, 20, 3, ColorUtil.rgba(0, 0, 0, 255 * alpha));

            Fonts.msMedium[14].drawString(stack, content, x + 4 - 30, y + 5, RenderUtil.reAlphaInt(-1, (int) (255 * alpha)));
            Fonts.msMedium[12].drawString(stack, text, x + 4 - 30, y + 13, RenderUtil.reAlphaInt(-1, (int) (255 * alpha)));
            return 24;
        }
    }
}
Оригинал:Посмотреть вложение 264128
Моё: Посмотреть вложение 264129
Только не бейте палками пж
где взять библеотеку нетикс? Спасибо
 
Помогите сделать под цвет клиента, пожалуйста
 
Назад
Сверху Снизу