Skip to content

Commit

Permalink
Hologram Items render now incorrect working
Browse files Browse the repository at this point in the history
  • Loading branch information
Nekiplay committed Nov 24, 2024
1 parent ff39481 commit 5498db6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ public class HologramData {
public double z;
public String text;
public Color color;
public int item_id = 0;
public int item_scale = 2;

public HologramData() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ public class HologramDataListed {
public String dimension;
public Color color;
public double max_render_distance = 16;
public int item_id = 0;
public double scale = 1;
public int item_scale = 2;
public boolean distanceScaling = false;

public ArrayList<HologramData> other_holograms = new ArrayList<HologramData>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,9 @@ private void on2DRender(Render2DEvent event) {
text.render(MeteorStarscript.run(scripts.get(hologram_text)), hX, hY, hologramData.color, true);
for (HologramData hologramData1 : hologramData.other_holograms) {
text.render(MeteorStarscript.run(scripts.get(hologramData1.text)), hX - hologramData1.x, hY - hologramData1.y, hologramData1.color, true);
if (hologramData1.item_id != 0) {
Item item = Item.byRawId(hologramData1.item_id);
RenderUtils.drawItem(event.drawContext, item.getDefaultStack(), (int) ((int) hX - hologramData1.x), (int) ((int) 0 - hologramData1.y), hologramData1.item_scale, true);
}
}

text.end();
if (hologramData.item_id != 0) {
Item item = Item.byRawId(hologramData.item_id);
RenderUtils.drawItem(event.drawContext, item.getDefaultStack(), (int) hX, (int) 0, hologramData.item_scale, true);
}
NametagUtils.end(event.drawContext);
}
}
Expand Down

0 comments on commit 5498db6

Please sign in to comment.