Начинающий
- Статус
- Онлайн
- Регистрация
- 30 Апр 2025
- Сообщения
- 72
- Реакции
- 0
- Выберите загрузчик игры
- Прочие моды
вторая тема, наштрихал быстренько по приколу, иконки дельты не нашел извините
SS: мой скид
SS: оригинал для сравнения
DW:
SS: мой скид
SS: оригинал для сравнения
DW:
Пожалуйста, авторизуйтесь для просмотра ссылки.
WatermarkRenderer:
package dezz.huesos.ui.display.impl;
import com.mojang.blaze3d.matrix.MatrixStack;
import dezz.huesos.events.EventDisplay;
import dezz.huesos.functions.impl.render.HUD;
import dezz.huesos.ui.display.ElementRenderer;
import dezz.huesos.utils.render.ColorUtils;
import dezz.huesos.utils.render.DisplayUtils;
import dezz.huesos.utils.render.font.Fonts;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.util.ResourceLocation;
@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class WatermarkRenderer implements ElementRenderer {
@Override
public void render(EventDisplay eventDisplay){
MatrixStack ms = eventDisplay.getMatrixStack();
String username = "symexxxxxi";// тут ник менять
String server = mc.getCurrentServerData() != null ? mc.getCurrentServerData().serverIP : "Singleplayer";
String fps = mc.debugFPS + "";
float fontSize = 7.0f;
float elementHeight = 16;
float usernameWidth = Fonts.sfsemi.getWidth(username, fontSize);
float serverWidth = Fonts.sfsemi.getWidth(server, fontSize);
float fpsWidth = Fonts.sfsemi.getWidth(fps, fontSize);
float usernameIconWidth = Fonts.icons2.getWidth("W", fontSize);
float serverIconWidth = Fonts.icos.getWidth("n", fontSize);
float fpsIconWidth = Fonts.icons.getWidth("B", fontSize);
float fps2IconWidth = Fonts.icons.getWidth("B", fontSize);
float contentWidth = usernameIconWidth + usernameWidth +
serverIconWidth + serverWidth +
fpsIconWidth + fps2IconWidth + fpsWidth;
float contentWidth2 = usernameIconWidth + usernameWidth +
serverIconWidth + serverWidth;
float width = contentWidth + 15;// pasta pasta land pashchu expu kak ded
final ResourceLocation delta = new ResourceLocation("dezzhuesos/images/delta.png");
DisplayUtils.drawRoundedRect(18, 2, width + 2, 15, 4, HUD.getColor1(1));
DisplayUtils.drawRoundedRect(2, 2, 15, 15, 4, HUD.getColor1(1));
DisplayUtils.drawRoundedRect(19, 3, width, 13, 3, HUD.getColor2(1));
DisplayUtils.drawRoundedRect(3, 3, 13, 13, 3, HUD.getColor2(1));
DisplayUtils.drawImageMain(delta, 1.25f, 1.5f, 17, 17, HUD.getColor1(1));
Fonts.icons2.drawText(ms, "W", 22, 7, HUD.getColor1(1), fontSize);
Fonts.sfsemi.drawText(ms, username, 30, 6, ColorUtils.rgba(255, 255, 255, 255), fontSize);
Fonts.icos.drawText(ms, "n", 70, 7, HUD.getColor1(1), fontSize);
Fonts.sfsemi.drawText(ms, server, 79, 6, ColorUtils.rgba(255, 255, 255, 255), fontSize);
Fonts.icons.drawText(ms, "B", contentWidth2 + 30, 7.25f, HUD.getColor1(1), 5.5f);
Fonts.icons.drawText(ms, "B", contentWidth2 + 33, 7.25f, HUD.getColor1(1), 5.5f);
Fonts.sfsemi.drawText(ms, fps, contentWidth + 17, 6.25f, ColorUtils.rgba(255, 255, 255, 255), fontSize);
}
}
Последнее редактирование: