Fix backward compatibility while printing dimension sprite in list coordinates view

This commit is contained in:
Surya 2021-10-31 16:45:46 +05:30 committed by Surya Prakash
parent ec178502ca
commit 509ede5424

View File

@ -13,6 +13,9 @@ public class IdentifiersCache {
public IdentifiersCache() {
add(DEFAULT, cache);
add("overworld", cache);
add("minecraft:overworld", "overworld", cache);
add("minecraft:the_end", "end", cache);
add("minecraft:the_nether", "nether", cache);
add("nether", cache);
add("end", cache);
add("ping", cache);
@ -25,6 +28,10 @@ public class IdentifiersCache {
return cache.getOrDefault(key, cache.get(DEFAULT));
}
private static void add(String identifierName, String resourceName, Map<String, Identifier> cache) {
cache.put(identifierName, createIdentifier(resourceName));
}
private static void add(String resourceName, Map<String, Identifier> cache) {
cache.put(resourceName, createIdentifier(resourceName));
}