Add some interaction debug for holograms

This commit is contained in:
fullwall 2024-04-15 15:47:59 +08:00
parent b0ba7b2062
commit ccce76d9f0
1 changed files with 2 additions and 1 deletions

View File

@ -468,6 +468,7 @@ public class HologramTrait extends Trait {
public void onSeenByPlayer(Player player) { public void onSeenByPlayer(Player player) {
if (lastOffset == null) if (lastOffset == null)
return; return;
Messaging.debug("Linking", player, hologram.getEntity());
NMS.linkTextInteraction(player, hologram.getEntity(), npc.getEntity(), lastOffset.y); NMS.linkTextInteraction(player, hologram.getEntity(), npc.getEntity(), lastOffset.y);
} }
@ -658,7 +659,7 @@ public class HologramTrait extends Trait {
TextDisplay disp = (TextDisplay) hologram.getEntity(); TextDisplay disp = (TextDisplay) hologram.getEntity();
disp.setBillboard(Billboard.CENTER); disp.setBillboard(Billboard.CENTER);
Transformation tf = disp.getTransformation(); Transformation tf = disp.getTransformation();
tf.getTranslation().y = (float) offset.y + 0.1f; tf.getTranslation().y = (float) offset.y + 0.2f;
disp.setTransformation(tf); disp.setTransformation(tf);
if (hologram.getEntity().getVehicle() == null) { if (hologram.getEntity().getVehicle() == null) {
base.getEntity().addPassenger(hologram.getEntity()); base.getEntity().addPassenger(hologram.getEntity());