Catch unknown block errors

This commit is contained in:
LOOHP
2024-12-14 22:04:29 +00:00
parent 26ce9c4a9d
commit c29b219d9c
2 changed files with 38 additions and 27 deletions
@@ -133,7 +133,7 @@ public class PacketRegistry {
JSONObject jsonIds = (JSONObject) jsonMappings.get(boundKey);
for (Object objPacketKey : jsonIds.keySet()) {
String packetKey = (String) objPacketKey;
idMapping.put(Key.key(packetKey), (int) (long) ((JSONObject) jsonIds.get(packetKey)).get("protocol_id"));
idMapping.put(Key.key(packetKey), ((Number) ((JSONObject) jsonIds.get(packetKey)).get("protocol_id")).intValue());
}
mappings.put(packetBound, idMapping);
}