diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/StateRegistry.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/StateRegistry.java index 43f79eb8e..79cfc4942 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/StateRegistry.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/StateRegistry.java @@ -167,7 +167,7 @@ public enum StateRegistry { private final ProtocolConstants.Direction direction; private final StateRegistry state; - private final IntObjectMap versions = new IntObjectHashMap<>(); + private final IntObjectMap versions = new IntObjectHashMap<>(16); public PacketRegistry(Direction direction, StateRegistry state) { this.direction = direction; @@ -216,8 +216,8 @@ public enum StateRegistry { public class ProtocolVersion { public final int id; - final IntObjectMap> packetIdToSupplier = new IntObjectHashMap<>(); - final Map, Integer> packetClassToId = new HashMap<>(); + final IntObjectMap> packetIdToSupplier = new IntObjectHashMap<>(16, 0.5f); + final Map, Integer> packetClassToId = new HashMap<>(16, 0.5f); ProtocolVersion(final int id) { this.id = id;