From 823eb1f3927ae01b3d4ba05c8a83ce34eaf87daf Mon Sep 17 00:00:00 2001 From: RK_01 <50594595+RaphiMC@users.noreply.github.com> Date: Wed, 16 Mar 2022 18:35:58 +0100 Subject: [PATCH] Fix inventory acknowledgements being dropped sometimes (#2848) --- .../storage/InventoryAcknowledgements.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_17to1_16_4/storage/InventoryAcknowledgements.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_17to1_16_4/storage/InventoryAcknowledgements.java index a19b36043..8f463923e 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_17to1_16_4/storage/InventoryAcknowledgements.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_17to1_16_4/storage/InventoryAcknowledgements.java @@ -18,17 +18,17 @@ package com.viaversion.viaversion.protocols.protocol1_17to1_16_4.storage; import com.viaversion.viaversion.api.connection.StorableObject; -import it.unimi.dsi.fastutil.ints.IntOpenHashSet; -import it.unimi.dsi.fastutil.ints.IntSet; +import it.unimi.dsi.fastutil.ints.IntArrayList; +import it.unimi.dsi.fastutil.ints.IntList; public final class InventoryAcknowledgements implements StorableObject { - private final IntSet ids = new IntOpenHashSet(); + private final IntList ids = new IntArrayList(); public void addId(int id) { ids.add(id); } public boolean removeId(int id) { - return ids.remove(id); + return ids.rem(id); } }