Add entity spawn wait ticks settings for debugging purposes

This commit is contained in:
fullwall 2022-07-03 14:39:45 +08:00
parent 55f8a1f75c
commit dfbdfaed09
2 changed files with 2 additions and 1 deletions

View File

@ -110,6 +110,7 @@ public class Settings {
DISABLE_LOOKCLOSE_WHILE_NAVIGATING("npc.default.look-close.disable-while-navigating", true),
DISABLE_MC_NAVIGATION_FALLBACK("npc.pathfinding.disable-mc-fallback-navigation", true),
DISABLE_TABLIST("npc.tablist.disable", true),
ENTITY_SPAWN_WAIT_TICKS("general.entity-spawn-wait-ticks", 10),
ERROR_COLOUR("general.color-scheme.message-error", "<c>"),
FOLLOW_ACROSS_WORLDS("npc.follow.teleport-across-worlds", true),
HIGHLIGHT_COLOUR("general.color-scheme.message-highlight", "<e>"),

View File

@ -298,7 +298,7 @@ public class CitizensNPC extends AbstractNPC {
@Override
public void run() {
if (timer++ > 10) {
if (timer++ > Setting.ENTITY_SPAWN_WAIT_TICKS.asInt()) {
Messaging.debug("Couldn't spawn", CitizensNPC.this, "entity not added to world");
entityController.remove();
cancel();