Watermark newcode editon

Начинающий
Статус
Оффлайн
Регистрация
11 Янв 2025
Сообщения
56
Реакции[?]
0
Поинты[?]
0
делал первый раз, сам не кидайте палками
1736944935530.png
P.S если надо чуть схоже с newcode тогда 57 строку задокументируйте // перед строчкой
1736956332852.pngтак без shadow
hud:
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.font.FontManager;
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 {
    private final ResourceLocation user = new ResourceLocation("impresive/images/user.png");
    private final ResourceLocation user2 = new ResourceLocation("impresive/images/user2.png");
    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();
        float w = 85;
        float h = fontSize + padding * 3;
        drawStyledRect(posX, posY, w+padding, h + 4, 3);

        Fonts.sfui.drawText(ms, "Admin > funtime.su", posX + 45 + 2, posY + 5, ColorUtils.rgb(255, 255, 255), 10);
        DisplayUtils.drawImage(user2, posX + 30 , (float) (posY + 4.5), 10, 10, ColorUtils.getColor(0));

    }


    private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

        DisplayUtils.drawShadow(x + 1, y + 1, width - 65, height - 2, 30, ColorUtils.getColor(0));
        DisplayUtils.drawRoundedRect(x - 2, y - 2, width -65, height + 4, new Vector4f(9,9,9,9), Gradient.ClientGradient());
        DisplayUtils.drawRoundedRect(x - 1, y - 1, width -67, height + 2, new Vector4f(8,8,8,8), ColorUtils.rgba(26,26,26,160));
        DisplayUtils.drawRoundedRect(x + 25, y , width +50, height +2, new Vector4f(6,6,6,6), ColorUtils.rgba(26,26,26,200));
        DisplayUtils.drawImage(user, x -1 , y -1, 20, 20, ColorUtils.getColor(0));

    }
}
util:
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));
    }
}
 

Вложения

Последнее редактирование:
Read Only
Статус
Оффлайн
Регистрация
11 Июл 2024
Сообщения
227
Реакции[?]
3
Поинты[?]
3K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
делал первый раз, сам не кидайте палками
Посмотреть вложение 296112

hud:
/* 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.font.FontManager;
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 {
    private final ResourceLocation user = new ResourceLocation("impresive/images/user.png");
    private final ResourceLocation user2 = new ResourceLocation("impresive/images/user2.png");
    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();
        float w = 85;
        float h = fontSize + padding * 3;
        drawStyledRect(posX, posY, w+padding, h + 4, 3);

        Fonts.sfui.drawText(ms, "Admin > funtime.su", posX + 45 + 2, posY + 5, ColorUtils.rgb(255, 255, 255), 10);
        DisplayUtils.drawImage(user2, posX + 30 , (float) (posY + 4.5), 10, 10, ColorUtils.getColor(0));

    }


    private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

        DisplayUtils.drawShadow(x + 1, y + 1, width - 65, height - 2, 30, ColorUtils.getColor(0));
        DisplayUtils.drawRoundedRect(x - 2, y - 2, width -65, height + 4, new Vector4f(9,9,9,9), Gradient.ClientGradient());
        DisplayUtils.drawRoundedRect(x - 1, y - 1, width -67, height + 2, new Vector4f(8,8,8,8), ColorUtils.rgba(26,26,26,160));
        DisplayUtils.drawRoundedRect(x + 25, y , width +50, height +2, new Vector4f(6,6,6,6), ColorUtils.rgba(26,26,26,200));
        DisplayUtils.drawImage(user, x -1 , y -1, 20, 20, ColorUtils.getColor(0));

    }
}
util:
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));
    }
}
eto pizdec
 
Начинающий
Статус
Оффлайн
Регистрация
26 Дек 2023
Сообщения
1,173
Реакции[?]
15
Поинты[?]
6K
делал первый раз, сам не кидайте палками
Посмотреть вложение 296112

hud:
/* 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.font.FontManager;
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 {
    private final ResourceLocation user = new ResourceLocation("impresive/images/user.png");
    private final ResourceLocation user2 = new ResourceLocation("impresive/images/user2.png");
    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();
        float w = 85;
        float h = fontSize + padding * 3;
        drawStyledRect(posX, posY, w+padding, h + 4, 3);

        Fonts.sfui.drawText(ms, "Admin > funtime.su", posX + 45 + 2, posY + 5, ColorUtils.rgb(255, 255, 255), 10);
        DisplayUtils.drawImage(user2, posX + 30 , (float) (posY + 4.5), 10, 10, ColorUtils.getColor(0));

    }


    private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

        DisplayUtils.drawShadow(x + 1, y + 1, width - 65, height - 2, 30, ColorUtils.getColor(0));
        DisplayUtils.drawRoundedRect(x - 2, y - 2, width -65, height + 4, new Vector4f(9,9,9,9), Gradient.ClientGradient());
        DisplayUtils.drawRoundedRect(x - 1, y - 1, width -67, height + 2, new Vector4f(8,8,8,8), ColorUtils.rgba(26,26,26,160));
        DisplayUtils.drawRoundedRect(x + 25, y , width +50, height +2, new Vector4f(6,6,6,6), ColorUtils.rgba(26,26,26,200));
        DisplayUtils.drawImage(user, x -1 , y -1, 20, 20, ColorUtils.getColor(0));

    }
}
util:
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));
    }
}
задумка пиздатая, реализация по виду - 7/10
код не смотрел, боюсь
8/10, продолжай в том же духе!
 
Начинающий
Статус
Оффлайн
Регистрация
3 Май 2023
Сообщения
741
Реакции[?]
4
Поинты[?]
4K
делал первый раз, сам не кидайте палками
Посмотреть вложение 296112

hud:
/* 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.font.FontManager;
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 {
    private final ResourceLocation user = new ResourceLocation("impresive/images/user.png");
    private final ResourceLocation user2 = new ResourceLocation("impresive/images/user2.png");
    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();
        float w = 85;
        float h = fontSize + padding * 3;
        drawStyledRect(posX, posY, w+padding, h + 4, 3);

        Fonts.sfui.drawText(ms, "Admin > funtime.su", posX + 45 + 2, posY + 5, ColorUtils.rgb(255, 255, 255), 10);
        DisplayUtils.drawImage(user2, posX + 30 , (float) (posY + 4.5), 10, 10, ColorUtils.getColor(0));

    }


    private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

        DisplayUtils.drawShadow(x + 1, y + 1, width - 65, height - 2, 30, ColorUtils.getColor(0));
        DisplayUtils.drawRoundedRect(x - 2, y - 2, width -65, height + 4, new Vector4f(9,9,9,9), Gradient.ClientGradient());
        DisplayUtils.drawRoundedRect(x - 1, y - 1, width -67, height + 2, new Vector4f(8,8,8,8), ColorUtils.rgba(26,26,26,160));
        DisplayUtils.drawRoundedRect(x + 25, y , width +50, height +2, new Vector4f(6,6,6,6), ColorUtils.rgba(26,26,26,200));
        DisplayUtils.drawImage(user, x -1 , y -1, 20, 20, ColorUtils.getColor(0));

    }
}
util:
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));
    }
}
не похоже вообще
 
Начинающий
Статус
Оффлайн
Регистрация
26 Дек 2023
Сообщения
1,173
Реакции[?]
15
Поинты[?]
6K
Начинающий
Статус
Оффлайн
Регистрация
15 Июн 2024
Сообщения
764
Реакции[?]
7
Поинты[?]
4K
Пиздато дружище, особенно для первой работы, просто ахуенно! Продолжай в том же духе!
 
Начинающий
Статус
Оффлайн
Регистрация
11 Янв 2025
Сообщения
56
Реакции[?]
0
Поинты[?]
0
ну если убрать глоу ебанный и сделать иконки ка у них то да один в один
добавил в тему что нужно убрать если нужно более похожую ватер марку, спасибо за совет
 
Начинающий
Статус
Оффлайн
Регистрация
20 Июн 2024
Сообщения
438
Реакции[?]
1
Поинты[?]
2K
делал первый раз, сам не кидайте палками
Посмотреть вложение 296112
P.S если надо чуть схоже с newcode тогда 57 строку задокументируйте // перед строчкой
Посмотреть вложение 296127так без shadow
hud:
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.font.FontManager;
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 {
    private final ResourceLocation user = new ResourceLocation("impresive/images/user.png");
    private final ResourceLocation user2 = new ResourceLocation("impresive/images/user2.png");
    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();
        float w = 85;
        float h = fontSize + padding * 3;
        drawStyledRect(posX, posY, w+padding, h + 4, 3);

        Fonts.sfui.drawText(ms, "Admin > funtime.su", posX + 45 + 2, posY + 5, ColorUtils.rgb(255, 255, 255), 10);
        DisplayUtils.drawImage(user2, posX + 30 , (float) (posY + 4.5), 10, 10, ColorUtils.getColor(0));

    }


    private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

        DisplayUtils.drawShadow(x + 1, y + 1, width - 65, height - 2, 30, ColorUtils.getColor(0));
        DisplayUtils.drawRoundedRect(x - 2, y - 2, width -65, height + 4, new Vector4f(9,9,9,9), Gradient.ClientGradient());
        DisplayUtils.drawRoundedRect(x - 1, y - 1, width -67, height + 2, new Vector4f(8,8,8,8), ColorUtils.rgba(26,26,26,160));
        DisplayUtils.drawRoundedRect(x + 25, y , width +50, height +2, new Vector4f(6,6,6,6), ColorUtils.rgba(26,26,26,200));
        DisplayUtils.drawImage(user, x -1 , y -1, 20, 20, ColorUtils.getColor(0));

    }
}
util:
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));
    }
}
с форджа на экспу, но в этот раз будешь уже ратить?
 
Начинающий
Статус
Оффлайн
Регистрация
29 Окт 2024
Сообщения
111
Реакции[?]
1
Поинты[?]
1K
делал первый раз, сам не кидайте палками
Посмотреть вложение 296112
P.S если надо чуть схоже с newcode тогда 57 строку задокументируйте // перед строчкой
Посмотреть вложение 296127так без shadow
hud:
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.font.FontManager;
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 {
    private final ResourceLocation user = new ResourceLocation("impresive/images/user.png");
    private final ResourceLocation user2 = new ResourceLocation("impresive/images/user2.png");
    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();
        float w = 85;
        float h = fontSize + padding * 3;
        drawStyledRect(posX, posY, w+padding, h + 4, 3);

        Fonts.sfui.drawText(ms, "Admin > funtime.su", posX + 45 + 2, posY + 5, ColorUtils.rgb(255, 255, 255), 10);
        DisplayUtils.drawImage(user2, posX + 30 , (float) (posY + 4.5), 10, 10, ColorUtils.getColor(0));

    }


    private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

        DisplayUtils.drawShadow(x + 1, y + 1, width - 65, height - 2, 30, ColorUtils.getColor(0));
        DisplayUtils.drawRoundedRect(x - 2, y - 2, width -65, height + 4, new Vector4f(9,9,9,9), Gradient.ClientGradient());
        DisplayUtils.drawRoundedRect(x - 1, y - 1, width -67, height + 2, new Vector4f(8,8,8,8), ColorUtils.rgba(26,26,26,160));
        DisplayUtils.drawRoundedRect(x + 25, y , width +50, height +2, new Vector4f(6,6,6,6), ColorUtils.rgba(26,26,26,200));
        DisplayUtils.drawImage(user, x -1 , y -1, 20, 20, ColorUtils.getColor(0));

    }
}
util:
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));
    }
}
норм
 
Начинающий
Статус
Оффлайн
Регистрация
18 Май 2023
Сообщения
70
Реакции[?]
0
Поинты[?]
0
делал первый раз, сам не кидайте палками
Посмотреть вложение 296112
P.S если надо чуть схоже с newcode тогда 57 строку задокументируйте // перед строчкой
Посмотреть вложение 296127так без shadow
hud:
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.font.FontManager;
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 {
    private final ResourceLocation user = new ResourceLocation("impresive/images/user.png");
    private final ResourceLocation user2 = new ResourceLocation("impresive/images/user2.png");
    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();
        float w = 85;
        float h = fontSize + padding * 3;
        drawStyledRect(posX, posY, w+padding, h + 4, 3);

        Fonts.sfui.drawText(ms, "Admin > funtime.su", posX + 45 + 2, posY + 5, ColorUtils.rgb(255, 255, 255), 10);
        DisplayUtils.drawImage(user2, posX + 30 , (float) (posY + 4.5), 10, 10, ColorUtils.getColor(0));

    }


    private void drawStyledRect(float x,
                                float y,
                                float width,
                                float height,
                                float radius) {

        DisplayUtils.drawShadow(x + 1, y + 1, width - 65, height - 2, 30, ColorUtils.getColor(0));
        DisplayUtils.drawRoundedRect(x - 2, y - 2, width -65, height + 4, new Vector4f(9,9,9,9), Gradient.ClientGradient());
        DisplayUtils.drawRoundedRect(x - 1, y - 1, width -67, height + 2, new Vector4f(8,8,8,8), ColorUtils.rgba(26,26,26,160));
        DisplayUtils.drawRoundedRect(x + 25, y , width +50, height +2, new Vector4f(6,6,6,6), ColorUtils.rgba(26,26,26,200));
        DisplayUtils.drawImage(user, x -1 , y -1, 20, 20, ColorUtils.getColor(0));

    }
}
util:
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));
    }
}
норм для первого раза а так изи скиднуть
 
Сверху Снизу