3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-27 08:30:12 +01:00

Prevent large Object[] allocations in command list translation

Dieser Commit ist enthalten in:
Camotoy 2022-10-30 12:28:48 -04:00
Ursprung cc82f4b871
Commit 90c9d5b9c4
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F

Datei anzeigen

@ -137,7 +137,7 @@ public class JavaCommandsTranslator extends PacketTranslator<ClientboundCommands
// Get and update the commandArgs list with the found arguments // Get and update the commandArgs list with the found arguments
if (node.getChildIndices().length >= 1) { if (node.getChildIndices().length >= 1) {
for (int childIndex : node.getChildIndices()) { for (int childIndex : node.getChildIndices()) {
commandArgs.computeIfAbsent(nodeIndex, ArrayList::new).add(nodes[childIndex]); commandArgs.computeIfAbsent(nodeIndex, ($) -> new ArrayList<>()).add(nodes[childIndex]);
} }
} }