[Change] global registry warning only with verbose logging (#90)
This commit is contained in:
parent
6f80069627
commit
7c1775f443
1 changed files with 4 additions and 1 deletions
|
@ -41,9 +41,12 @@ public class WorldBootstrap {
|
||||||
return LAST_REGISTRY_ACCESS;
|
return LAST_REGISTRY_ACCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static byte WARN_COUNT_GLOBAL_REGISTRY = 0;
|
||||||
|
|
||||||
public static RegistryAccess getLastRegistryAccessOrElseBuiltin() {
|
public static RegistryAccess getLastRegistryAccessOrElseBuiltin() {
|
||||||
if (LAST_REGISTRY_ACCESS == null) {
|
if (WARN_COUNT_GLOBAL_REGISTRY < 10 && LAST_REGISTRY_ACCESS == null && Configs.MAIN_CONFIG.verboseLogging()) {
|
||||||
WorldsTogether.LOGGER.error("Tried to read from global registry!");
|
WorldsTogether.LOGGER.error("Tried to read from global registry!");
|
||||||
|
WARN_COUNT_GLOBAL_REGISTRY++;
|
||||||
}
|
}
|
||||||
return LAST_REGISTRY_ACCESS;
|
return LAST_REGISTRY_ACCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue