ss: https://imgur.com/a/l2S2SwB code: package me.night.dev.api.notify; import com.google.common.collect.Lists; import com.mojang.blaze3d.matrix.MatrixStack; import me.night.dev.Night; import me.night.dev.modules.impl.render.Notify; import me.night.dev.inter.clickgui.ClickGuiScreen; import me.night.dev.utility.render.RoundedUtil; import net.minecraft.client.MainWindow; import net.minecraft.client.Minecraft; import net.minecraft.util.math.MathHelper; import java.awt.*; import java.util.List; import static me.night.dev.modules.impl.render.Hud.getColor; public class NotificationRenderer { private static final Minecraft mc = Minecraft.getInstance(); private static final List<Notification> NOTIFICATIONS = Lists.newCopyOnWriteArrayList(); public static void queue(String title, String content, int second, NotificationMode type) { NOTIFICATIONS.add(new Notification(title, content, type, second * 2000, mc.rubik_18)); } public static void publish(MainWindow sr, MatrixStack matrixStack) { if (Night.instance.featureManager.getFeature(Notify.class).isEnabled() && !(mc.currentScreen instanceof ClickGuiScreen)) { if (!NOTIFICATIONS.isEmpty()) { int y = sr.getScaledHeight() - 40; double better; for (Notification notification : NOTIFICATIONS) { better = mc.rubik_18.getStringWidth(notification.getTitle() + " " + notification.getContent()); if (!notification.getTimer().hasReached(notification.getTime() / 2)) notification.notificationTimeBarWidth = 360; else notification.notificationTimeBarWidth = MathHelper.easeOutBack((float) notification.notificationTimeBarWidth, 0, (float) (0.5f * Night.deltaTime())); if (!notification.getTimer().hasReached(notification.getTime())) { notification.x = MathHelper.easeOutBack((float) notification.x, (float) (mc.getMainWindow().getScaledWidth() - better), (float) (1 * Night.deltaTime())); notification.y = MathHelper.easeOutBack((float) notification.y, (float) y, (float) (1 * Night.deltaTime())); } else { notification.x = MathHelper.easeOutBack((float) notification.x, (float) (mc.getMainWindow().getScaledWidth() + 50), (float) (1 * Night.deltaTime())); notification.y = MathHelper.easeOutBack((float) notification.y, (float) y, (float) (1 * Night.deltaTime())); if (notification.x > mc.getMainWindow().getScaledWidth() + 24 && mc.player != null && mc.world != null && !mc.gameSettings.showDebugInfo) NOTIFICATIONS.remove(notification); } RoundedUtil.drawGradientRound((float) (notification.x + 46), (float) notification.y + 15,notification.getWidth() - 87, (float) 23.0f,2, getColor(2), getColor(40), getColor(120), getColor(200), matrixStack); RoundedUtil.drawRound((float) (notification.x + 47), (float) notification.y + 16,notification.getWidth() - 89, (float) 21.0f,2, Color.darkGray.darker(), matrixStack); mc.icon2.drawString("a", (float) (notification.x + 50), (float) (notification.y + 20), -1, new MatrixStack()); mc.rubik_17.drawString(notification.getTitle().toLowerCase(), (float) (notification.x + 60), (float) (notification.y + 19), -1, new MatrixStack()); mc.rubik_15.drawString(notification.getContent().toLowerCase(), (float) (notification.x + 50), (float) (notification.y + 30), -1, new MatrixStack()); y -= 30; } } } } }