Don't use weak/soft references for keys, attempt to lessen memory impact further
Dieser Commit ist enthalten in:
Ursprung
c101c3553b
Commit
e4edbf288d
@ -19,7 +19,7 @@ import net.minecraft.server.WorldChunkManager;
|
|||||||
|
|
||||||
public class CraftChunk implements Chunk {
|
public class CraftChunk implements Chunk {
|
||||||
private WeakReference<net.minecraft.server.Chunk> weakChunk;
|
private WeakReference<net.minecraft.server.Chunk> weakChunk;
|
||||||
private final ConcurrentMap<Integer, Block> cache = new MapMaker().softKeys().softValues().makeMap();
|
private final ConcurrentMap<Integer, Block> cache = new MapMaker().softValues().makeMap();
|
||||||
private WorldServer worldServer;
|
private WorldServer worldServer;
|
||||||
private int x;
|
private int x;
|
||||||
private int z;
|
private int z;
|
||||||
|
@ -38,7 +38,7 @@ public class CraftWorld implements World {
|
|||||||
private final WorldServer world;
|
private final WorldServer world;
|
||||||
private Environment environment;
|
private Environment environment;
|
||||||
private final CraftServer server = (CraftServer)Bukkit.getServer();
|
private final CraftServer server = (CraftServer)Bukkit.getServer();
|
||||||
private ConcurrentMap<Integer, CraftChunk> unloadedChunks = new MapMaker().weakKeys().weakValues().makeMap();
|
private ConcurrentMap<Integer, CraftChunk> unloadedChunks = new MapMaker().weakValues().makeMap();
|
||||||
private final ChunkGenerator generator;
|
private final ChunkGenerator generator;
|
||||||
private final List<BlockPopulator> populators = new ArrayList<BlockPopulator>();
|
private final List<BlockPopulator> populators = new ArrayList<BlockPopulator>();
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren