From 22379eda6fcdf71f7f6cc8263e5242981b18df84 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 22 Sep 2021 10:16:42 +0200 Subject: [PATCH] Add todo --- .../protocol1_13to1_12_2/storage/BlockStorage.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_13to1_12_2/storage/BlockStorage.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_13to1_12_2/storage/BlockStorage.java index e27ee3cba..73b2967a4 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_13to1_12_2/storage/BlockStorage.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_13to1_12_2/storage/BlockStorage.java @@ -25,6 +25,7 @@ import it.unimi.dsi.fastutil.ints.IntSet; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; +// TODO Fix memory leak lolz (only a smol one tho) public class BlockStorage implements StorableObject { private static final IntSet WHITELIST = new IntOpenHashSet(46, 1F); private final Map blocks = new ConcurrentHashMap<>(); @@ -81,8 +82,8 @@ public class BlockStorage implements StorableObject { return blocks.remove(position); } - public static class ReplacementData { - private int original; + public static final class ReplacementData { + private final int original; private int replacement; public ReplacementData(int original, int replacement) { @@ -94,10 +95,6 @@ public class BlockStorage implements StorableObject { return original; } - public void setOriginal(int original) { - this.original = original; - } - public int getReplacement() { return replacement; }