Set hologram tracking range to the same as the npc's

This commit is contained in:
fullwall 2024-01-21 15:47:00 +08:00
parent 647215e8dd
commit af728ec4b1
1 changed files with 2 additions and 0 deletions

View File

@ -116,6 +116,8 @@ public class HologramTrait extends Trait {
}
if (viewRange != -1) {
hologramNPC.data().set(NPC.Metadata.TRACKING_RANGE, viewRange);
} else if (npc.data().has(NPC.Metadata.TRACKING_RANGE)) {
hologramNPC.data().set(NPC.Metadata.TRACKING_RANGE, npc.data().get(NPC.Metadata.TRACKING_RANGE));
}
hologramNPC.spawn(currentLoc.clone().add(0, getEntityBbHeight() + heightOffset, 0));