mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Prevent large Object[] allocations in command list translation
This commit is contained in:
parent
cc82f4b871
commit
90c9d5b9c4
1 changed files with 1 additions and 1 deletions
|
@ -137,7 +137,7 @@ public class JavaCommandsTranslator extends PacketTranslator<ClientboundCommands
|
|||
// Get and update the commandArgs list with the found arguments
|
||||
if (node.getChildIndices().length >= 1) {
|
||||
for (int childIndex : node.getChildIndices()) {
|
||||
commandArgs.computeIfAbsent(nodeIndex, ArrayList::new).add(nodes[childIndex]);
|
||||
commandArgs.computeIfAbsent(nodeIndex, ($) -> new ArrayList<>()).add(nodes[childIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue