Add always-use-name-holograms

This commit is contained in:
fullwall 2020-07-18 19:08:10 +08:00
parent b571debec1
commit c8898b52e3
2 changed files with 6 additions and 0 deletions

View File

@ -57,6 +57,7 @@ public class Settings {
}
public enum Setting {
ALWAYS_USE_NAME_HOLOGRAM("npc.always-use-name-holograms", false),
ASTAR_ITERATIONS_PER_TICK("npc.pathfinding.new-finder.iterations-per-tick", 5000),
AUTH_SERVER_URL("general.authlib.profile-url", "https://sessionserver.mojang.com/session/minecraft/profile/"),
CHAT_BYSTANDERS_HEAR_TARGETED_CHAT("npc.chat.options.bystanders-hear-targeted-chat", true),

View File

@ -168,6 +168,11 @@ public class CitizensNPC extends AbstractNPC {
navigator.load(root.getRelative("navigator"));
}
@Override
public boolean requiresNameHologram() {
return super.requiresNameHologram() || Setting.ALWAYS_USE_NAME_HOLOGRAM.asBoolean();
}
private void resetCachedCoord() {
if (cachedCoord == null)
return;