1111import net .minestom .server .instance .Instance ;
1212import net .minestom .server .instance .block .Block ;
1313import net .swofty .type .generic .entity .InteractionEntity ;
14+ import net .swofty .type .generic .entity .hologram .HologramEntity ;
1415import net .swofty .type .generic .user .HypixelPlayer ;
1516import net .swofty .type .skyblockgeneric .item .SkyBlockItem ;
1617import net .swofty .type .skyblockgeneric .item .updater .NonPlayerItemUpdater ;
@@ -27,7 +28,7 @@ public class GlassDisplay extends LivingEntity {
2728
2829 // Child entities that need to be removed when this display is removed
2930 private LivingEntity itemEntity ;
30- private TextDisplayEntity nameDisplay ;
31+ private HologramEntity nameDisplay ;
3132 private InteractionEntity interactionEntity ;
3233
3334 public GlassDisplay (SkyBlockItem item , BiConsumer <HypixelPlayer , PlayerEntityInteractEvent > onClick ) {
@@ -60,10 +61,8 @@ public void spawn() {
6061 itemEntity .setNoGravity (true );
6162 itemEntity .setInstance (getInstance (), getPosition ().add (0.5 , -0.1 , 0.5 ));
6263
63- nameDisplay = new TextDisplayEntity (Component .text (item .getDisplayName ()), textDisplayMeta -> {
64- textDisplayMeta .setTranslation (new Vec (0 , 0.8 , 0 ));
65- });
66- nameDisplay .setInstance (getInstance (), getPosition ().add (0.5 , 0 , 0.5 ));
64+ nameDisplay = new HologramEntity (Component .text (item .getDisplayName ()));
65+ nameDisplay .setInstance (getInstance (), getPosition ().add (0.5 , 0.5 , 0.5 ));
6766
6867 interactionEntity = new InteractionEntity (scale , scale , onClick );
6968 interactionEntity .setInstance (getInstance (), getPosition ().add (offset + (scale / 2 ), 0 , offset + (scale / 2 )));
0 commit comments