Skip to content

Commit 054f963

Browse files
committed
Holograms crash fix
1 parent dc4087e commit 054f963

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/nekiplay/meteorplus/features/modules/render/holograms/HologramModule.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,9 @@ private void on2DRender(Render2DEvent event) {
6969
for (HologramDataListed hologramData : inWorldHolograms) {
7070
Vector3d pos = new Vector3d(hologramData.x, hologramData.y, hologramData.z);
7171
if (pos.distance(camera_pos.x, camera_pos.y, camera_pos.z) <= hologramData.max_render_distance) {
72-
if (NametagUtils.to2D(pos, hologramData.scale, hologramData.distanceScaling)) {
72+
if (NametagUtils.to2D(pos, hologramData.scale)) {
7373
TextRenderer text = TextRenderer.get();
7474
NametagUtils.begin(pos);
75-
text.beginBig();
7675

7776
String hologram_text = hologramData.text;
7877
double hologramWidth = text.getWidth(hologram_text, true);
@@ -85,6 +84,7 @@ private void on2DRender(Render2DEvent event) {
8584
double hY = -heightDown;
8685

8786
var script = scripts.get(hologram_text);
87+
text.beginBig();
8888
if (script != null) {
8989
text.render(MeteorStarscript.run(script), hX, hY, hologramData.color, true);
9090
for (HologramData hologramData1 : hologramData.other_holograms) {
@@ -100,7 +100,7 @@ private void on2DRender(Render2DEvent event) {
100100
}
101101
}
102102
text.end();
103-
NametagUtils.end(event.drawContext);
103+
NametagUtils.end();
104104
}
105105
}
106106
}

0 commit comments

Comments
 (0)