Skip to content

Commit 29a74c1

Browse files
committed
Always cache generated fallback id mappings
1 parent bfbc5ca commit 29a74c1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

BlueMapCore/src/main/java/de/bluecolored/bluemap/core/config/BlockIdConfig.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ public BlockState get(int numeralId, int meta) {
9999
if (state == null) {
100100
state = numeralMappings.getOrDefault(new BlockNumeralIDMeta(numeralId, 0), BlockState.MISSING); //meta-fallback
101101

102+
numeralMappings.put(numidmeta, state);
103+
102104
if (autopoulationConfigLoader != null) {
103-
numeralMappings.put(numidmeta, state);
104-
105105
synchronized (autopoulationConfigLoader) {
106106
try {
107107
ConfigurationNode node = autopoulationConfigLoader.load();
@@ -134,10 +134,10 @@ public BlockState get(String id, int numeralId, int meta) {
134134
if (state == null) state = new BlockState(id);
135135
}
136136

137+
idMappings.put(idmeta, state);
138+
numeralMappings.put(numidmeta, state);
139+
137140
if (autopoulationConfigLoader != null) {
138-
idMappings.put(idmeta, state);
139-
numeralMappings.put(numidmeta, state);
140-
141141
synchronized (autopoulationConfigLoader) {
142142
try {
143143
ConfigurationNode node = autopoulationConfigLoader.load();

0 commit comments

Comments
 (0)