diff --git a/common/src/main/java/com/viaversion/viaversion/protocol/ProtocolManagerImpl.java b/common/src/main/java/com/viaversion/viaversion/protocol/ProtocolManagerImpl.java index 4584fc57f..cc00403bb 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocol/ProtocolManagerImpl.java +++ b/common/src/main/java/com/viaversion/viaversion/protocol/ProtocolManagerImpl.java @@ -279,12 +279,14 @@ public class ProtocolManagerImpl implements ProtocolManager { ProtocolPathKey protocolKey = new ProtocolPathKeyImpl(clientVersion, serverVersion); List protocolList = pathCache.get(protocolKey); if (protocolList != null) { - return protocolList; + return protocolList.isEmpty() ? null : protocolList; } // Calculate path Object2ObjectSortedMap outputPath = getProtocolPath(new Object2ObjectLinkedOpenHashMap<>(), clientVersion, serverVersion); if (outputPath == null) { + // Also cache that there is no path + pathCache.put(protocolKey, List.of()); return null; } @@ -374,14 +376,14 @@ public class ProtocolManagerImpl implements ProtocolManager { public List getBaseProtocols(@Nullable ProtocolVersion clientVersion, @Nullable ProtocolVersion serverVersion) { final List list = new ArrayList<>(); if (clientVersion != null) { - for (Pair, Protocol> rangeProtocol : Lists.reverse(serverboundBaseProtocols)) { + for (Pair, Protocol> rangeProtocol : serverboundBaseProtocols) { if (rangeProtocol.key().contains(clientVersion)) { list.add(rangeProtocol.value()); } } } if (serverVersion != null) { - for (Pair, Protocol> rangeProtocol : Lists.reverse(clientboundBaseProtocols)) { + for (Pair, Protocol> rangeProtocol : clientboundBaseProtocols) { if (rangeProtocol.key().contains(serverVersion)) { list.add(rangeProtocol.value()); } @@ -534,7 +536,7 @@ public class ProtocolManagerImpl implements ProtocolManager { Preconditions.checkArgument(!mappingsLoaded); // If this log message is missing, something is wrong - Via.getPlatform().getLogger().info("Finished mapping loading, shutting down loader executor!"); + Via.getPlatform().getLogger().info("Finished mapping loading, shutting down loader executor."); mappingsLoaded = true; mappingLoaderExecutor.shutdown(); mappingLoaderExecutor = null;