This commit is contained in:
Jesse Boyd
2019-11-24 00:57:29 +00:00
parent 35be4c7fb0
commit 1f19b92b0b
17 changed files with 1778 additions and 90 deletions

View File

@ -56,6 +56,13 @@ public final class LegacyMapper {
private static final Logger log = LoggerFactory.getLogger(LegacyMapper.class);
private static LegacyMapper INSTANCE = new LegacyMapper();
static {
try {
INSTANCE.loadFromResource();
} catch (Throwable e) {
log.warn("Failed to load the built-in legacy id registry", e);
}
}
private Map<String, String> blockEntries = new HashMap<>();
@ -68,11 +75,6 @@ public final class LegacyMapper {
* Create a new instance.
*/
private LegacyMapper() {
try {
loadFromResource();
} catch (Throwable e) {
log.warn("Failed to load the built-in legacy id registry", e);
}
}
/**
@ -118,6 +120,7 @@ public final class LegacyMapper {
}
if (blockState == null) {
log.warn("Unknown block: " + value);
continue;
}
}
blockArr[combinedId] = blockState.getInternalId();