From 3a87cc92d373ce1f63f9152495cadb5384a52d13 Mon Sep 17 00:00:00 2001 From: RaphiMC <50594595+RaphiMC@users.noreply.github.com> Date: Wed, 27 Dec 2023 22:42:18 +0100 Subject: [PATCH] Readded ResourcePackHeaderDiff sanity check --- .../viafabricplus/fixes/data/ResourcePackHeaderDiff.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/de/florianmichael/viafabricplus/fixes/data/ResourcePackHeaderDiff.java b/src/main/java/de/florianmichael/viafabricplus/fixes/data/ResourcePackHeaderDiff.java index 02290804..127342ff 100644 --- a/src/main/java/de/florianmichael/viafabricplus/fixes/data/ResourcePackHeaderDiff.java +++ b/src/main/java/de/florianmichael/viafabricplus/fixes/data/ResourcePackHeaderDiff.java @@ -87,6 +87,12 @@ 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 (version.getProtocol().isSnapshot()) continue; + if (!GAME_VERSION_DIFF.containsKey(version)) { + throw new RuntimeException("The version " + version + " has no pack format registered"); + } + } } /**