Make hologram renderer variables volatile

This commit is contained in:
fullwall 2024-08-19 15:08:14 +08:00
parent e45f4b784d
commit d0f7ba7695

View File

@ -622,7 +622,7 @@ public class HologramTrait extends Trait {
} }
public static class InteractionVehicleRenderer extends SingleEntityHologramRenderer { public static class InteractionVehicleRenderer extends SingleEntityHologramRenderer {
private Vector3d lastOffset; private volatile Vector3d lastOffset;
@Override @Override
protected NPC createNPC(Entity base, String name, Vector3d offset) { protected NPC createNPC(Entity base, String name, Vector3d offset) {
@ -746,7 +746,7 @@ public class HologramTrait extends Trait {
*/ */
// TODO: make view range part of hologram renderer? // TODO: make view range part of hologram renderer?
public abstract static class SingleEntityHologramRenderer implements HologramRenderer { public abstract static class SingleEntityHologramRenderer implements HologramRenderer {
protected NPC hologram; protected volatile NPC hologram;
private NPCRegistry registry; private NPCRegistry registry;
private int spawnWaitTicks; private int spawnWaitTicks;
protected String text; protected String text;