forked from mirror/BlueMap
Always cache generated fallback id mappings
This commit is contained in:
parent
bfbc5ca108
commit
29a74c125a
@ -99,9 +99,9 @@ public BlockState get(int numeralId, int meta) {
|
||||
if (state == null) {
|
||||
state = numeralMappings.getOrDefault(new BlockNumeralIDMeta(numeralId, 0), BlockState.MISSING); //meta-fallback
|
||||
|
||||
numeralMappings.put(numidmeta, state);
|
||||
|
||||
if (autopoulationConfigLoader != null) {
|
||||
numeralMappings.put(numidmeta, state);
|
||||
|
||||
synchronized (autopoulationConfigLoader) {
|
||||
try {
|
||||
ConfigurationNode node = autopoulationConfigLoader.load();
|
||||
@ -134,10 +134,10 @@ public BlockState get(String id, int numeralId, int meta) {
|
||||
if (state == null) state = new BlockState(id);
|
||||
}
|
||||
|
||||
idMappings.put(idmeta, state);
|
||||
numeralMappings.put(numidmeta, state);
|
||||
|
||||
if (autopoulationConfigLoader != null) {
|
||||
idMappings.put(idmeta, state);
|
||||
numeralMappings.put(numidmeta, state);
|
||||
|
||||
synchronized (autopoulationConfigLoader) {
|
||||
try {
|
||||
ConfigurationNode node = autopoulationConfigLoader.load();
|
||||
|
Loading…
Reference in New Issue
Block a user