был пост уже такой, но там убогий градиент, убогий метод рендера, куча мусора в коде (у меня все также xD) /* by acidka, date - 11.11.24 * like dicks */ package im.expensive.ui.display.impl; import com.mojang.blaze3d.matrix.MatrixStack; import im.expensive.Expensive; import im.expensive.events.EventDisplay; import im.expensive.ui.display.ElementRenderer; import im.expensive.ui.styles.Style; import im.expensive.utils.client.Gradient; import im.expensive.utils.render.ColorUtils; import im.expensive.utils.render.DisplayUtils; import im.expensive.utils.render.font.Fonts; import im.expensive.utils.text.GradientUtil; import lombok.AccessLevel; import lombok.RequiredArgsConstructor; import lombok.experimental.FieldDefaults; import net.minecraft.client.Minecraft; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.vector.Vector4f; import net.minecraft.util.text.Color; import net.minecraft.util.text.ITextComponent; import net.minecraft.client.multiplayer.ServerData; @FieldDefaults(level = AccessLevel.PRIVATE) @RequiredArgsConstructor public class WatermarkRenderer implements ElementRenderer { @override public void render(EventDisplay eventDisplay) { MatrixStack ms = eventDisplay.getMatrixStack(); float posX = 5; float posY = 5; float padding = 2; float fontSize = 8; Style style = Expensive.getInstance().getStyleManager().getCurrentStyle(); ITextComponent Relake = GradientUtil.gradient("Relake"); ITextComponent fps = GradientUtil.gradient(" "+mc.debugFPS+ "fps"); ITextComponent uid = GradientUtil.gradient("uid: 0"); float w = 85; float h = fontSize + padding * 3; drawStyledRect(posX, posY, w+padding, h + 4, 3); Fonts.sfbold.drawCenteredText(ms, Relake, posX + 20, posY+6, 7); Fonts.sfbold.drawCenteredText(ms, fps, posX + 55, posY+6, 7); Fonts.sfMedium.drawText(ms, "/", posX + 36, posY+5, ColorUtils.rgba(210, 210, 210,110), 7); Fonts.sfMedium.drawText(ms, " /", posX + 35, posY+5, ColorUtils.rgba(210, 210, 210,110), 7); Fonts.sfbold.drawCenteredText(ms, uid, posX + 88, posY+6, 7); Fonts.sfMedium.drawText(ms, "/", posX + 71, posY+5, ColorUtils.rgba(210, 210, 210,110), 7); Fonts.sfMedium.drawText(ms, " /", posX + 70, posY+5, ColorUtils.rgba(210, 210, 210,110), 7); } private void drawStyledRect(float x, float y, float width, float height, float radius) { DisplayUtils.drawShadow(x + 1, y + 1, width - 20, height - 2, 30, ColorUtils.getColor(0)); DisplayUtils.drawRoundedRect(x - 2, y - 2, width + 22, height + 4, new Vector4f(4,4,4,4), Gradient.ClientGradient()); DisplayUtils.drawRoundedRect(x - 1, y - 1, width + 20, height + 2, new Vector4f(4,4,4,4), ColorUtils.rgba(0,0,0,160)); } } utils - package im.expensive.utils.client; import im.expensive.functions.impl.render.HUD; import im.expensive.utils.math.Vector4i; import im.expensive.utils.render.ColorUtils; import net.minecraft.client.renderer.Tessellator; import net.minecraft.util.text.ITextComponent; public class Gradient { public static Vector4i ClientGradient() { return new Vector4i(ColorUtils.setAlpha(HUD.getColor(0, 1), 200), ColorUtils.setAlpha(HUD.getColor(90, 1), 200), ColorUtils.setAlpha(HUD.getColor(180, 1), 200), ColorUtils.setAlpha(HUD.getColor(270, 1), 200)); } public static Vector4i ClientGradientA() { return new Vector4i(ColorUtils.setAlpha(HUD.getColor(0, 1), 100), ColorUtils.setAlpha(HUD.getColor(90, 1), 100), ColorUtils.setAlpha(HUD.getColor(180, 1), 100), ColorUtils.setAlpha(HUD.getColor(270, 1), 100)); } } sps