- Выберите загрузчик игры
- Прочие моды
Сделано за 4 минуты
кому это говно нужно то забирайте
ss orig Pulse
ss my
кому это говно нужно то забирайте
GOVNO:
package im.expensive.ui.display.impl;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;
import im.expensive.events.EventDisplay;
import im.expensive.ui.display.ElementRenderer;
import im.expensive.utils.render.ColorUtils;
import im.expensive.utils.render.DisplayUtils;
import im.expensive.utils.render.font.Fonts;
import net.minecraft.client.Minecraft;
import net.minecraft.util.text.Color;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.Style;
import org.lwjgl.opengl.GL11;
public class WatermarkRenderer implements ElementRenderer {
@Override
public void render(EventDisplay eventDisplay) {
MatrixStack ms = eventDisplay.getMatrixStack();
Minecraft mc = Minecraft.getInstance();
float posY = 10f;
float fontSize = 12f;
float height = 26f;
int ping = getPing(mc);
int fps = mc.getDebugFPS();
ITextComponent domainText = new StringTextComponent("govno.pro") .setStyle(Style.EMPTY.setColor(Color.fromInt(ColorUtils.rgb(255, 255, 255))));
ITextComponent slashText = new StringTextComponent(" / ") .setStyle(Style.EMPTY.setColor(Color.fromInt(ColorUtils.rgb(80, 80, 80))));
ITextComponent pingText = new StringTextComponent(ping + " ms") .setStyle(Style.EMPTY.setColor(Color.fromInt(ColorUtils.rgb(209, 209, 209))));
ITextComponent fpsText = new StringTextComponent(fps + " FPS") .setStyle(Style.EMPTY.setColor(Color.fromInt(ColorUtils.rgb(209, 209, 209))));
float pulseWidth = 16f;
float padding = 12f;
float pulsePadding = 6f;
float domainWidth = Fonts.sfui.getWidth(domainText, fontSize);
float slashWidth = Fonts.sfui.getWidth(slashText, fontSize);
float pingWidth = Fonts.sfui.getWidth(pingText, fontSize);
float fpsWidth = Fonts.sfui.getWidth(fpsText, fontSize);
float totalWidth = padding + pulseWidth + pulsePadding + domainWidth + slashWidth + pingWidth + slashWidth + fpsWidth + padding;
float posX = (mc.getMainWindow().getScaledWidth() - totalWidth) / 2.0f;
Styled(posX, posY, totalWidth, height, height / 2.0f);
float currentX = posX + padding;
float pulseY = posY + (height / 2f);
Govno(currentX, pulseY);
currentX += pulseWidth + pulsePadding;
float textY = posY + (height / 2f) - (fontSize / 2f) + 1f;
Fonts.sfui.drawText(ms, domainText, currentX, textY, fontSize, 255);
currentX += domainWidth;
Fonts.sfui.drawText(ms, slashText, currentX, textY, fontSize, 255);
currentX += slashWidth;
Fonts.sfui.drawText(ms, pingText, currentX, textY, fontSize, 255);
currentX += pingWidth;
Fonts.sfui.drawText(ms, slashText, currentX, textY, fontSize, 255);
currentX += slashWidth;
Fonts.sfui.drawText(ms, fpsText, currentX, textY, fontSize, 255);
}
private void Styled(float x, float y, float width, float height, float radius) {
DisplayUtils.drawRoundedRect(x - 0.5f, y - 0.5f, width + 1, height + 1, radius + 0.5f, ColorUtils.getColor(0));
DisplayUtils.drawRoundedRect(x, y, width, height, radius, ColorUtils.rgba(18, 18, 22, 230));
}
private void Govno(float x, float y) {
// не спрашивайте даже за это
RenderSystem.pushMatrix();
RenderSystem.enableBlend();
RenderSystem.disableTexture();
RenderSystem.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glEnable(GL11.GL_LINE_SMOOTH);
GL11.glLineWidth(2.5f);
RenderSystem.color4f(107 / 255f, 70 / 255f, 193 / 255f, 1.0f);
GL11.glBegin(GL11.GL_LINE_STRIP);
GL11.glVertex2f(x, y);
GL11.glVertex2f(x + 4, y);
GL11.glVertex2f(x + 7, y - 6);
GL11.glVertex2f(x + 10, y + 5);
GL11.glVertex2f(x + 13, y);
GL11.glVertex2f(x + 16, y);
GL11.glEnd();
GL11.glDisable(GL11.GL_LINE_SMOOTH);
RenderSystem.enableTexture();
RenderSystem.popMatrix();
}
private int getPing(Minecraft mc) {
if (mc.getConnection() != null && mc.player != null) {
try {
return mc.getConnection().getPlayerInfo(mc.player.getUniqueID()).getResponseTime();
} catch (Exception e) {
return 0;
}
}
return 0;
}
}