Skip to content

Commit ce4dfd7

Browse files
committed
fix: render bugs and remove minimap temporary
1 parent d1ffbc7 commit ce4dfd7

6 files changed

Lines changed: 24 additions & 21 deletions

File tree

src/main/java/top/fpsmaster/features/impl/utility/LevelTag.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,16 @@ else if (mc.gameSettings.thirdPersonView == 1)
109109

110110

111111

112-
GlStateManager.disableTexture2D();
113-
worldRenderer.begin(7, DefaultVertexFormats.POSITION_COLOR);
114-
GL11.glColor4f(backgroundColor.getColor().getRed(), backgroundColor.getColor().getGreen(), backgroundColor.getColor().getBlue(), backgroundColor.getColor().getAlpha());
115-
worldRenderer.pos(-j - 1, -1 + i, 0.0F).endVertex();
116-
worldRenderer.pos(-j - 1, 8 + i, 0.0F).endVertex();
117-
worldRenderer.pos(j + 1, 8 + i, 0.0F).endVertex();
118-
worldRenderer.pos(j + 1, -1 + i, 0.0F).endVertex();
119-
tessellator.draw();
112+
if(!diableBackground.getValue()) {
113+
GlStateManager.disableTexture2D();
114+
worldRenderer.begin(7, DefaultVertexFormats.POSITION_COLOR);
115+
worldRenderer.pos(-j - 1, -1 + i, 0.0F).color(backgroundColor.getColor().getRed() / 255f, backgroundColor.getColor().getGreen() / 255f, backgroundColor.getColor().getBlue() / 255f, backgroundColor.getColor().getAlpha() / 255f).endVertex();
116+
worldRenderer.pos(-j - 1, 8 + i, 0.0F).color(backgroundColor.getColor().getRed() / 255f, backgroundColor.getColor().getGreen() / 255f, backgroundColor.getColor().getBlue() / 255f, backgroundColor.getColor().getAlpha() / 255f).endVertex();
117+
worldRenderer.pos(j + 1, 8 + i, 0.0F).color(backgroundColor.getColor().getRed() / 255f, backgroundColor.getColor().getGreen() / 255f, backgroundColor.getColor().getBlue() / 255f, backgroundColor.getColor().getAlpha() / 255f).endVertex();
118+
worldRenderer.pos(j + 1, -1 + i, 0.0F).color(backgroundColor.getColor().getRed() / 255f, backgroundColor.getColor().getGreen() / 255f, backgroundColor.getColor().getBlue() / 255f, backgroundColor.getColor().getAlpha() / 255f).endVertex();
119+
tessellator.draw();
120+
}
121+
GL11.glColor4f(1,1,1,1);
120122
GlStateManager.enableTexture2D();
121123
if (isMate) {
122124
Images.draw(new ResourceLocation("client/textures/mate.png"), -fontRenderer.getStringWidth(str) / 2f - 4f, i - 1, 8, 8, -1, true);

src/main/java/top/fpsmaster/features/manager/ModuleManager.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ public void onKey(EventKey e) {
4444
module.toggle();
4545
}
4646
}
47-
// if (e.key == Keyboard.KEY_INSERT) {
48-
// Minecraft.getMinecraft().displayGuiScreen(new CosmeticScreen());
49-
// }
5047
}
5148

5249
public void addModule(Module module) {
@@ -110,7 +107,7 @@ public void init() {
110107
modules.add(new PingDisplay());
111108
modules.add(new CoordsDisplay());
112109
modules.add(new ModsList());
113-
modules.add(new MiniMap());
110+
// modules.add(new MiniMap());
114111
modules.add(new DirectionDisplay());
115112
modules.add(new DamageIndicator());
116113
modules.add(new TabOverlay());

src/main/java/top/fpsmaster/ui/custom/impl/KeystrokesComponent.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,14 @@ private void drawBorderRect(float x, float y, float width, float height, float b
242242
Color border = resolveBorderColor(x, y);
243243

244244
StencilUtil.initStencilToWrite();
245-
Rects.rounded(Math.round(outerX), Math.round(outerY), Math.round(outerW), Math.round(outerH), radius, new Color(0, 0, 0, 255));
245+
Rects.rounded(outerX, outerY, outerW, outerH, radius, new Color(0, 0, 0, 255).getRGB());
246246
org.lwjgl.opengl.GL11.glStencilFunc(org.lwjgl.opengl.GL11.GL_ALWAYS, 0, 0xFF);
247247
org.lwjgl.opengl.GL11.glStencilOp(org.lwjgl.opengl.GL11.GL_REPLACE, org.lwjgl.opengl.GL11.GL_REPLACE, org.lwjgl.opengl.GL11.GL_REPLACE);
248-
Rects.rounded(Math.round(x), Math.round(y), Math.round(scaledW), Math.round(scaledH), radius, new Color(0, 0, 0, 255));
248+
Rects.rounded(x, y, scaledW, scaledH, radius, new Color(0, 0, 0, 255).getRGB());
249249
org.lwjgl.opengl.GL11.glColorMask(true, true, true, true);
250250
org.lwjgl.opengl.GL11.glStencilFunc(org.lwjgl.opengl.GL11.GL_EQUAL, 1, 0xFF);
251251
org.lwjgl.opengl.GL11.glStencilOp(org.lwjgl.opengl.GL11.GL_KEEP, org.lwjgl.opengl.GL11.GL_KEEP, org.lwjgl.opengl.GL11.GL_KEEP);
252-
Rects.rounded(Math.round(outerX), Math.round(outerY), Math.round(outerW), Math.round(outerH), radius, border);
252+
Rects.rounded(outerX, outerY, outerW, outerH, radius, border.getRGB());
253253
StencilUtil.uninitStencilBuffer();
254254
}
255255

@@ -292,7 +292,7 @@ private void drawPressAnimation(float x, float y, float width, float height, boo
292292
float scaledH = height * scale;
293293
if (mode.equals("Pulse") || mode.equals("Bloom")) {
294294
StencilUtil.initStencilToWrite();
295-
Rects.rounded(Math.round(x), Math.round(y), Math.round(scaledW), Math.round(scaledH), mod.rounded.getValue() ? mod.roundRadius.getValue().intValue() : 0, new Color(0, 0, 0, 255));
295+
Rects.rounded(x, y, scaledW, scaledH, mod.rounded.getValue() ? mod.roundRadius.getValue().intValue() : 0, new Color(0, 0, 0, 255).getRGB());
296296
StencilUtil.readStencilBuffer(1);
297297
for (PressAnim anim : pressAnims) {
298298
float progress = Math.min(anim.progress, 1.0f);
@@ -322,7 +322,7 @@ private void drawPressAnimation(float x, float y, float width, float height, boo
322322
Keystrokes.pressAnimColor.getColor().getBlue(),
323323
(int) (Keystrokes.pressAnimColor.getColor().getAlpha() * alpha)
324324
);
325-
Rects.rounded(Math.round(x + scaledW / 2f - sizeW / 2f), Math.round(y + scaledH / 2f - sizeH / 2f), Math.round(sizeW), Math.round(sizeH), mod.rounded.getValue() ? mod.roundRadius.getValue().intValue() : 0, c);
325+
Rects.rounded(x + scaledW / 2f - sizeW / 2f, y + scaledH / 2f - sizeH / 2f, sizeW, sizeH, mod.rounded.getValue() ? mod.roundRadius.getValue().intValue() : 0, c.getRGB());
326326
}
327327
}
328328
}

src/main/java/top/fpsmaster/utils/render/draw/Rects.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ public static void rounded(int x, int y, int width, int height, int radius, Colo
5151
rounded(x, y, width, height, radius, color.getRGB());
5252
}
5353

54+
public static void rounded(float x, float y, float width, float height, int radius, int color) {
55+
rounded(x, y, width, height, radius, color, false);
56+
}
57+
5458
public static void rounded(int x, int y, int width, int height, Color color) {
5559
rounded(x, y, width, height, 3, color.getRGB());
5660
}
@@ -77,8 +81,8 @@ public static void roundedImage(int x, int y, int width, int height, int radius,
7781
}
7882
}
7983

80-
public static void rounded(int x, int y, int width, int height, int radius, int color, boolean rawImage) {
81-
radius = Math.min(Math.min(height, width) / 2, radius);
84+
public static void rounded(float x, float y, float width, float height, int radius, int color, boolean rawImage) {
85+
radius = (int) Math.min(Math.min(height, width) / 2, radius);
8286
if (width < radius * 2 || radius < 1) {
8387
fill(x, y, width, height, color);
8488
return;

src/main/resources/assets/minecraft/client/lang/en_us.lang

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ nametags=Name Tags
419419
nametags.desc=Custom name tag visuals
420420
nametags.showself=Show Own Nametag
421421
nametags.health=Show Health
422-
nametags.diablebackground=Disable Background
422+
nametags.disablebackground=Disable Background
423423
nametags.backgroundcolor=Background Color
424424

425425
taboverlay=Tab Overlay

src/main/resources/assets/minecraft/client/lang/zh_cn.lang

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ nametags=名字标签
422422
nametags.desc=自定义名字标签
423423
nametags.showself=显示自己的名字标签
424424
nametags.health=显示血条
425-
nametags.diablebackground=禁用背景
425+
nametags.disablebackground=禁用背景
426426
nametags.backgroundcolor=背景颜色
427427

428428
taboverlay=Tab显示

0 commit comments

Comments
 (0)