Начинающий
- Статус
- Онлайн
- Регистрация
- 7 Дек 2025
- Сообщения
- 85
- Реакции
- 2
- Выберите загрузчик игры
- Прочие моды
Салам югейм, вроде сделал неплохую ватермарку на Zenith (recode), сливаю вам Information (как нижнюю строку) и Watermark (верхняя строка)
Короче, кому как, как по мне юзать можно, если чутка доделать ваще кайф будет
/del принимаются, знаю что хуйня
Также прикрепляю Icons.png (Шрифты/fonts), кому надо, там чутка изменил иконку человечка возле ника (если хотите можете юзать свои кнч)
SS - Прикрепил изображение
WatermarkComponent - там где ник игрока, лого , тпс и фпс
InformationComponent - Где айпишник и пинг
Они находятся в src\main\java\zenith\zov\client\hud\elements\component
Короче, кому как, как по мне юзать можно, если чутка доделать ваще кайф будет
/del принимаются, знаю что хуйня
Также прикрепляю Icons.png (Шрифты/fonts), кому надо, там чутка изменил иконку человечка возле ника (если хотите можете юзать свои кнч)
Пожалуйста, авторизуйтесь для просмотра ссылки.
SS - Прикрепил изображение
InformationComponent:
package zenith.zov.client.hud.elements.component;
import zenith.zov.Zenith;
import zenith.zov.base.animations.base.Animation;
import zenith.zov.base.animations.base.Easing;
import zenith.zov.base.font.Font;
import zenith.zov.base.font.Fonts;
import zenith.zov.base.theme.Theme;
import zenith.zov.client.hud.elements.draggable.DraggableHudElement;
import zenith.zov.utility.render.display.base.BorderRadius;
import zenith.zov.utility.render.display.base.CustomDrawContext;
import zenith.zov.utility.render.display.base.color.ColorRGBA;
import zenith.zov.utility.render.display.shader.DrawUtil;
import java.util.Locale;
public class InformationComponent extends DraggableHudElement {
public InformationComponent(String name, float initialX, float initialY, float windowWidth, float windowHeight, float offsetX, float offsetY, Align align) {
super(name,initialX, initialY,windowWidth,windowHeight,offsetX,offsetY,align);
}
Animation cordsWidthAnimation = new Animation(200, Easing.QUAD_IN_OUT);
Animation speedWidthAnimation = new Animation(200, Easing.QUAD_IN_OUT);
@Override
public void render(CustomDrawContext ctx) {
float iconSize = 6f;
float verticalPadding = 6f;
float iconTextSpacing = 4f;
float cellPadding = 5f;
float borderRadius = 4f;
Theme theme = Zenith.getInstance().getThemeManager().getCurrentTheme();
ColorRGBA mainBgColor =theme.getForegroundColor();
ColorRGBA highlightBgColor = theme.getForegroundLight();
ColorRGBA iconColor =theme.getColor();
ColorRGBA textColor = theme.getWhite();
ColorRGBA grayTextColor = theme.getGrayLight();
Font font = Fonts.MEDIUM.getFont(6);
String ipText = "Singleplayer";
if (mc.getNetworkHandler() != null && mc.getNetworkHandler().getServerInfo() != null) {
ipText = mc.getNetworkHandler().getServerInfo().address;
if (ipText.contains(":")) {
ipText = ipText.split(":")[0];
}
}
int ping = 0;
if (mc.player != null && mc.player.networkHandler != null && mc.player.networkHandler.getPlayerListEntry(mc.player.getUuid()) != null) {
ping = mc.player.networkHandler.getPlayerListEntry(mc.player.getUuid()).getLatency();
}
String pingText = String.valueOf(ping);
float ipWidth = cellPadding * 2 + iconSize + iconTextSpacing + font.width(ipText);
float pingWidth = cellPadding * 2 + iconSize + iconTextSpacing + font.width(pingText) + font.width("ms");
ipWidth = cordsWidthAnimation.update(ipWidth);
pingWidth = speedWidthAnimation.update(pingWidth);
float totalWidth = ipWidth + pingWidth;
float totalHeight = iconSize + (verticalPadding * 2);
this.width = totalWidth;
this.height = totalHeight;
DrawUtil.drawBlurHud(ctx.getMatrices(), x, y, ipWidth + pingWidth, totalHeight, 21, BorderRadius.all(4), ColorRGBA.WHITE);
ctx.drawRoundedRect(x, y, ipWidth, totalHeight, BorderRadius.left(borderRadius, borderRadius), highlightBgColor);
ctx.drawRoundedRect(x + ipWidth, y, pingWidth, totalHeight, BorderRadius.right(borderRadius, borderRadius), mainBgColor);
ctx.enableScissor((int) x, (int) y, (int) (x + ipWidth), (int) (y + height));
float currentX = x + cellPadding;
float iconY = y + (totalHeight - iconSize) / 2f;
float textY = y + (totalHeight - font.height()) / 2f;
Font iconFont = Fonts.ICONS.getFont(6);
ctx.drawText(iconFont, "4", currentX, iconY, iconColor);
currentX += iconSize + iconTextSpacing;
ctx.drawText(font, ipText, currentX, textY, textColor);
ctx.disableScissor();
currentX = x + ipWidth + cellPadding;
ctx.enableScissor((int) currentX, (int) y, (int) (currentX + pingWidth), (int) (y + height));
ctx.drawText(iconFont, "H", currentX, iconY, iconColor);
currentX += iconSize + iconTextSpacing;
currentX = drawPrefixedText(ctx, font, pingText, "ms", currentX, textY, textColor, grayTextColor);
ctx.disableScissor();
ctx.drawRoundedBorder(x, y, ipWidth + pingWidth, totalHeight, 0.1f, BorderRadius.all(4), theme.getForegroundStroke());
DrawUtil.drawRoundedCorner(ctx.getMatrices(), x, y, ipWidth + pingWidth, totalHeight, 0.1f, 12, theme.getColor(), BorderRadius.all(4));
}
private float drawPrefixedText(CustomDrawContext ctx, Font font, String prefix, String value, float x, float y, ColorRGBA prefixColor, ColorRGBA valueColor) {
ctx.drawText(font, prefix, x, y, prefixColor);
float prefixWidth = font.width(prefix);
ctx.drawText(font, value, x + prefixWidth, y, valueColor);
return x + prefix.length()*3.8f +value.length()*3.8f;
}
}
WatermarkComponent:
package zenith.zov.client.hud.elements.component;
import by.saskkeee.user.UserInfo;
import zenith.zov.Zenith;
import zenith.zov.base.font.Font;
import zenith.zov.base.font.Fonts;
import zenith.zov.base.theme.Theme;
import zenith.zov.client.hud.elements.HudElement;
import zenith.zov.client.hud.elements.draggable.DraggableHudElement;
import zenith.zov.utility.game.other.TextUtil;
import zenith.zov.utility.render.display.base.BorderRadius;
import zenith.zov.utility.render.display.base.CustomDrawContext;
import zenith.zov.utility.render.display.base.color.ColorRGBA;
import zenith.zov.utility.render.display.shader.DrawUtil;
import java.util.ArrayList;
import java.util.List;
public class WatermarkComponent extends DraggableHudElement {
private final List<HudElement> elements = new ArrayList<>();
public WatermarkComponent(String name, float initialX, float initialY, float windowWidth, float windowHeight, float offsetX, float offsetY, Align align) {
super(name,initialX, initialY,windowWidth,windowHeight,offsetX,offsetY,align);
}
@Override
public void render(CustomDrawContext ctx) {
float iconSize = 7f;
float elementSpacing = 1f;
float iconTextSpacing = 4f;
float cellPadding = 5f;
float borderRadius = 4f;
Theme theme = Zenith.getInstance().getThemeManager().getCurrentTheme();
ColorRGBA mainBgColor =theme.getForegroundColor();
ColorRGBA highlightBgColor = theme.getForegroundLight();
ColorRGBA iconColor = theme.getColor();
ColorRGBA textColor = theme.getWhite();
Font font = Fonts.MEDIUM.getFont(6);
String playerName = mc.player != null ? mc.player.getName().getString() : "";
elements.clear();
elements.add(new HudElement("5", () -> ""));
elements.add(new HudElement("2", () -> playerName));
elements.add(new HudElement("G", () -> String.valueOf(mc.getCurrentFps()), "fps"));
elements.add(new HudElement("I", () -> mc.player.networkHandler.getServerInfo() == null ? "20" : TextUtil.formatNumber(Zenith.getInstance().getServerHandler().getTPS()).replace(",", ".").replace(".0", ""), "tps"));
float totalWidth = 0;
for (HudElement el : elements) {
el.calculateWidth(font, iconSize, cellPadding, iconTextSpacing);
totalWidth += el.getWidth();
}
totalWidth += 4;
float totalHeight = 17;
this.width = totalWidth;
this.height = totalHeight;
DrawUtil.drawBlurHud(ctx.getMatrices(),x, y, width,height,21,BorderRadius.all(4),ColorRGBA.WHITE);
float currentX = this.x;
for (int i = 0; i < elements.size(); i++) {
HudElement el = elements.get(i);
BorderRadius r = (i == 0) ? BorderRadius.left(borderRadius, borderRadius) : (i == elements.size() - 1) ? BorderRadius.right(borderRadius, borderRadius) : BorderRadius.ZERO;
ctx.drawRoundedRect(currentX, y, el.getWidth()+(i==elements.size()-1?4:0), totalHeight, r,i == elements.size() - 1 || i % 2 == 0 ? highlightBgColor : mainBgColor);
el.drawContent(ctx, currentX+(i==0?4:0), y, totalHeight, iconSize, iconTextSpacing, iconColor, textColor, font);
currentX += el.getWidth() ;
}
ctx.drawRoundedBorder(x, y,totalWidth, totalHeight,0.01f,BorderRadius.all(4),theme.getForegroundStroke());
DrawUtil.drawRoundedCorner(ctx.getMatrices(), x, y,totalWidth, totalHeight,0.01f,12f,theme.getColor(),BorderRadius.all(4));
}
}
WatermarkComponent - там где ник игрока, лого , тпс и фпс
InformationComponent - Где айпишник и пинг
Они находятся в src\main\java\zenith\zov\client\hud\elements\component