Начинающий
- Статус
- Оффлайн
- Регистрация
- 11 Мар 2023
- Сообщения
- 2
- Реакции
- 0
- Выберите загрузчик игры
- OptiFine
- Прочие моды
Сделал буквально за 10 минут. Немного подправить, добавить блоков и будет норм
Пожалуйста, авторизуйтесь для просмотра ссылки.
Java:
package ru.voxelis.module.impl.render;
import net.minecraft.util.text.TextFormatting;
import ru.voxelis.Voxelis;
import ru.voxelis.draggable.impl.WaterMarkDraggable;
import ru.voxelis.event.Event;
import ru.voxelis.event.impl.EventRender2D;
import ru.voxelis.module.Module;
import ru.voxelis.module.ModuleInformation;
import ru.voxelis.module.category.Categories;
import ru.voxelis.module.settings.impl.CheckBoxSetting;
import ru.voxelis.module.settings.impl.ModeSetting;
import ru.voxelis.module.settings.impl.MultiBoxSetting;
import ru.voxelis.utils.blur.GBlur;
import ru.voxelis.utils.fonts.Fonts;
import ru.voxelis.utils.render.GradientText;
import ru.voxelis.utils.render.RenderUtil;
import java.awt.*;
import java.util.List;
import static ru.voxelis.utils.Wrapper.mc;
@ModuleInformation(name = "WaterMark", category = Categories.RENDER)
public class WaterMark extends Module {
public WaterMarkDraggable waterMarkDraggable = (WaterMarkDraggable) Voxelis.voxelis.draggableManager.getElement(WaterMarkDraggable.class);
@Override
public void event(Event event) {
if (event instanceof EventRender2D) {
String logoText = "P";
String build = "Release";
String text = TextFormatting.GRAY + " | " + TextFormatting.WHITE + build;
String login = TextFormatting.DARK_GRAY+ "| " + TextFormatting.WHITE + "CrashSystem";
float loginWidth = Fonts.sfBold[(int) (12 + waterMarkDraggable.scale)].getWidth(login) - 6;
float logoTextWidth = Fonts.icons[(int) (16 + waterMarkDraggable.scale)].getWidth(logoText) - 6;
float textWidth = Fonts.sfBold[(int) (12 + waterMarkDraggable.scale)].getWidth(text);
float totalWidth = logoTextWidth + textWidth + (12 + waterMarkDraggable.scale);
float height = Fonts.gilroyBold[(int) (16 + waterMarkDraggable.scale)].getFontHeight() + 4;
float centerX = waterMarkDraggable.x + (totalWidth / 2);
float centerY = waterMarkDraggable.y + (height / 2);
GBlur.stencilInit();
RenderUtil.drawRoundedRect(waterMarkDraggable.x, waterMarkDraggable.y, totalWidth, height, 4, new Color(25, 25, 25, 125));
GBlur.drawBlur(6, 1);
RenderUtil.drawRoundedRect(waterMarkDraggable.x, waterMarkDraggable.y, totalWidth, height, 4, new Color(15, 15, 15, 125));
float logoTextX = centerX - (logoTextWidth + textWidth + 8) / 2;
float logoTextY = centerY - (Fonts.icons[(int) (16 + waterMarkDraggable.scale)].getFontHeight() / 2) + 3;
GradientText.renderText(Fonts.icons[(int) (16 + waterMarkDraggable.scale)], ((EventRender2D) event).matrixStack, logoText, logoTextX + 2, logoTextY);
float buildX = centerX - (logoTextWidth + textWidth + 8) / 2;
float buildY = centerY - (Fonts.sfBold[(int) (12 + waterMarkDraggable.scale)].getFontHeight() / 2) + 2;
GradientText.renderText(Fonts.sfBold[(int) (12 + waterMarkDraggable.scale)], ((EventRender2D) event).matrixStack, build, buildX + Fonts.icons[(int) (16 + waterMarkDraggable.scale)].getWidth(logoText) + 6, buildY);
totalWidth += 10;
String loginLogo = "W";
float totalWidth2 = Fonts.icons[(int) (16 + waterMarkDraggable.scale)].getWidth(loginLogo) + Fonts.sfBold[(int) (12 + waterMarkDraggable.scale)].getWidth(login) + 16;
GBlur.stencilInit();
RenderUtil.drawRoundedRect(waterMarkDraggable.x + totalWidth - 6, waterMarkDraggable.y, totalWidth2, height, 4, new Color(25, 25, 25, 125));
GBlur.drawBlur(6, 1);
RenderUtil.drawRoundedRect(waterMarkDraggable.x + totalWidth - 6, waterMarkDraggable.y, totalWidth2, height, 4, new Color(15, 15, 15, 125));
float loginY = centerY - (Fonts.icons[(int) (16 + waterMarkDraggable.scale)].getFontHeight() / 2) + 3;
GradientText.renderText(Fonts.icons[(int) (16 + waterMarkDraggable.scale)], ((EventRender2D) event).matrixStack, loginLogo, waterMarkDraggable.x +totalWidth, loginY);
float textY = centerY - (Fonts.sfBold[(int) (12 + waterMarkDraggable.scale)].getFontHeight() / 2) + 2;
Fonts.sfBold[(int) (12 + waterMarkDraggable.scale)].drawString(((EventRender2D) event).matrixStack, login, waterMarkDraggable.x + totalWidth + Fonts.icons[(int) (16 + waterMarkDraggable.scale)].getWidth(loginLogo) + 4, textY, -1);
waterMarkDraggable.width = totalWidth;
waterMarkDraggable.height = height;
}
}
}