Начинающий
			
			
				
					
				
			
		- Статус
- Оффлайн
- Регистрация
- 27 Ноя 2020
- Сообщения
- 37
- Реакции
- 2
Основан на худе Vendex тык
основан notification на тык
(если ты выбрал цвет в темах любой то тогда будет такого же цвета худ)
hud(сюда не могу вставить) -
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
				
			основан notification на тык
	Пожалуйста, авторизуйтесь для просмотра ссылки.
(если ты выбрал цвет в темах любой то тогда будет такого же цвета худ)
hud(сюда не могу вставить) -
	Пожалуйста, авторизуйтесь для просмотра ссылки.
	Пожалуйста, авторизуйтесь для просмотра ссылки.
			
				Лютий код Notification:
			
		
		
		package wtf.nekoclient.notification;
import com.mojang.blaze3d.matrix.MatrixStack;
import lombok.Getter;
import lombok.Setter;
import net.minecraft.potion.EffectInstance;
import wtf.nekoclient.managment.Managment;
import wtf.nekoclient.util.animations.Animation;
import wtf.nekoclient.util.animations.Direction;
import wtf.nekoclient.util.animations.impl.DecelerateAnimation;
import wtf.nekoclient.util.font.Fonts;
import wtf.nekoclient.util.render.ColorUtil;
import wtf.nekoclient.util.render.RenderUtil;
import wtf.nekoclient.util.render.animation.AnimationMath;
import java.util.Comparator;
import java.util.concurrent.CopyOnWriteArrayList;
import static wtf.nekoclient.util.IMinecraft.mc;
import static wtf.nekoclient.util.render.ColorUtil.getColorStyle;
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 {
        [USER=270918]@Getter[/USER]
        [USER=1132491]@setter[/USER]
        private float x, y = mc.getMainWindow().scaledHeight() + 24;
        [USER=270918]@Getter[/USER]
        private String text;
        [USER=270918]@Getter[/USER]
        private String content;
        [USER=270918]@Getter[/USER]
        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));
            RenderUtil.Render2D.drawRoundedRect(x - 30, y, width + 30, 20, 3, ColorUtil.rgba(227, 147, 248, 34));
            //RenderUtil.Render2D.drawShadow(x - 30, y, width + 30, 20, 10, ColorUtil.getColor(100), ColorUtil.getColor(100), ColorUtil.getColor(0), ColorUtil.getColor(0));
            RenderUtil.Render2D.drawShadow(x - 30, y, width + 30, 20, 10, getColorStyle(40));
            Fonts.sfbold[14].drawString(stack, content, x + 4 - 30, y + 5, RenderUtil.reAlphaInt(-1, (int) (255 * alpha)));
            Fonts.sfsemibold[12].drawString(stack, text, x + 4 - 30, y + 13, RenderUtil.reAlphaInt(-1, (int) (255 * alpha)));
            return 24;
        }
    }
} 
				 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		
 
 
		 
 
		 
 
		 
 
		 
 
		
 
 
		 
 
		 
 
		 
 
		 
 
		