From 29a74c125ab2b32183972626bbca14bf3edc8b63 Mon Sep 17 00:00:00 2001 From: "Blue (Lukas Rieger)" Date: Mon, 13 Jan 2020 17:17:57 +0100 Subject: [PATCH] Always cache generated fallback id mappings --- .../bluecolored/bluemap/core/config/BlockIdConfig.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/config/BlockIdConfig.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/config/BlockIdConfig.java index f1889195..1ee5360a 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/config/BlockIdConfig.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/config/BlockIdConfig.java @@ -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();