Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-08 17:20:24 +01:00
Add todo
Dieser Commit ist enthalten in:
Ursprung
0fcfd78b62
Commit
22379eda6f
@ -25,6 +25,7 @@ import it.unimi.dsi.fastutil.ints.IntSet;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
// TODO Fix memory leak lolz (only a smol one tho)
|
||||||
public class BlockStorage implements StorableObject {
|
public class BlockStorage implements StorableObject {
|
||||||
private static final IntSet WHITELIST = new IntOpenHashSet(46, 1F);
|
private static final IntSet WHITELIST = new IntOpenHashSet(46, 1F);
|
||||||
private final Map<Position, ReplacementData> blocks = new ConcurrentHashMap<>();
|
private final Map<Position, ReplacementData> blocks = new ConcurrentHashMap<>();
|
||||||
@ -81,8 +82,8 @@ public class BlockStorage implements StorableObject {
|
|||||||
return blocks.remove(position);
|
return blocks.remove(position);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ReplacementData {
|
public static final class ReplacementData {
|
||||||
private int original;
|
private final int original;
|
||||||
private int replacement;
|
private int replacement;
|
||||||
|
|
||||||
public ReplacementData(int original, int replacement) {
|
public ReplacementData(int original, int replacement) {
|
||||||
@ -94,10 +95,6 @@ public class BlockStorage implements StorableObject {
|
|||||||
return original;
|
return original;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOriginal(int original) {
|
|
||||||
this.original = original;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getReplacement() {
|
public int getReplacement() {
|
||||||
return replacement;
|
return replacement;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren