Skip to content

Commit

Permalink
Fix nametag rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
MineGame159 committed Apr 25, 2024
1 parent e478060 commit 2dea450
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private void onRenderWorld(float tickDelta, long limitTime, CallbackInfo ci, boo
// Call utility classes

RenderUtils.updateScreenCenter();
NametagUtils.onRender(matrixStack, matrix4f);
NametagUtils.onRender(matrix4f2);

// Update model view matrix

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ public class PotionSpoof extends Module {
.build()
);

public final Setting<Boolean> applyGravity = sgGeneral.add(new BoolSetting.Builder()
.name("gravity")
.description("Applies gravity when levitating.")
.defaultValue(false)
.build()
);

public PotionSpoof() {
super(Categories.Player, "potion-spoof", "Spoofs potion statuses for you. SOME effects DO NOT work.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ public class NametagUtils {
private static final Vector4f pmMat4 = new Vector4f();
private static final Vector3d camera = new Vector3d();
private static final Vector3d cameraNegated = new Vector3d();
private static Matrix4f model;
private static Matrix4f projection;
private static final Matrix4f model = new Matrix4f();
private static final Matrix4f projection = new Matrix4f();
private static double windowScale;

public static double scale;

private NametagUtils() {
}

public static void onRender(MatrixStack matrices, Matrix4f projection) {
model = new Matrix4f(matrices.peek().getPositionMatrix());
NametagUtils.projection = projection;
public static void onRender(Matrix4f modelView) {
model.set(modelView);
NametagUtils.projection.set(RenderSystem.getProjectionMatrix());

Utils.set(camera, mc.gameRenderer.getCamera().getPos());
cameraNegated.set(camera);
Expand Down

0 comments on commit 2dea450

Please sign in to comment.