Added sanity checks for ResourcePackHeaderDiff

This commit is contained in:
RaphiMC 2023-12-19 19:30:25 +01:00
parent bacbb076cc
commit 7da33b0fe6
No known key found for this signature in database
GPG Key ID: 0F6BB0657A03AC94

View File

@ -81,6 +81,11 @@ public class ResourcePackHeaderDiff {
if (!GAME_VERSION_DIFF.containsKey(ProtocolHack.NATIVE_VERSION)) {
throw new RuntimeException("The current version has no pack format registered");
}
for (VersionEnum version : VersionEnum.OFFICIAL_SUPPORTED_PROTOCOLS) {
if (!GAME_VERSION_DIFF.containsKey(version)) {
throw new RuntimeException("The version " + version + " has no pack format registered");
}
}
}
public static GameVersion get(final VersionEnum version) {