From 676e74dc68a80dca8f2d9a04c1b8bde3c9a475cf Mon Sep 17 00:00:00 2001 From: Zoriot Date: Sat, 20 Jun 2026 00:21:44 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Correct=20Y-coordinate=20?= =?UTF-8?q?calculation=20for=20clickable=20entities.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to my extensive testing, offsetting it by +0.5, as was done previously, causes it to resemble a passenger and places it directly above the other armour stand. This makes the hitbox for actions uncomfortable at the top. Currently, I am not aware of a way to change this. This commit changes it to the same height as the text itself and works for down origin HGs and normal ones. This is important for a good user experience. The armour stands are still not in the same positions, so the hitbox starts at the text and goes above it. In the long term, another idea would be to use the same entity as the text. --- .../eu/decentsoftware/holograms/api/holograms/Hologram.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/main/java/eu/decentsoftware/holograms/api/holograms/Hologram.java b/plugin/src/main/java/eu/decentsoftware/holograms/api/holograms/Hologram.java index d2b181061..1a1a296f0 100644 --- a/plugin/src/main/java/eu/decentsoftware/holograms/api/holograms/Hologram.java +++ b/plugin/src/main/java/eu/decentsoftware/holograms/api/holograms/Hologram.java @@ -808,7 +808,7 @@ public void showClickableEntities(@NonNull Player player) { // Spawn clickable entities int amount = (int) (page.getHeight() / 2) + 1; Location location = getLocation().clone(); - location.setY((int) (location.getY() - (isDownOrigin() ? 0 : page.getHeight())) + 0.5); + location.setY((int) (location.getY() - (isDownOrigin() ? 0 : page.getHeight())) - 1d); for (int i = 0; i < amount; i++) { NmsClickableHologramRenderer renderer = page.getClickableRenderer(i); renderer.display(player, DecentPosition.fromBukkitLocation(location));