Fix the tests for now. More extensive ones later.

This commit is contained in:
Andrew Steinborn
2018-07-29 17:51:18 -04:00
parent e672f8d7cd
commit dcc40dd06b
2 changed files with 10 additions and 30 deletions

View File

@@ -110,6 +110,9 @@ public enum StateRegistry {
for (final PacketMapping mapping : mappings) {
ProtocolVersion version = this.versions.get(mapping.protocolVersion);
if (version == null) {
throw new IllegalArgumentException("Unknown protocol version " + mapping.protocolVersion);
}
version.packetIdToSupplier.put(mapping.id, packetSupplier);
version.packetClassToId.put(clazz, mapping.id);