3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-08 09:10:10 +01:00
Dieser Commit ist enthalten in:
Nassim Jahnke 2021-09-22 10:16:42 +02:00
Ursprung 0fcfd78b62
Commit 22379eda6f
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B

Datei anzeigen

@ -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<Position, ReplacementData> 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;
}