mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 04:05:50 -07:00
don't store weak references for EmptyChunks or cache CraftBlocks
This commit is contained in:
@@ -56,10 +56,12 @@ public class Chunk {
|
||||
Arrays.fill(this.c, -999);
|
||||
|
||||
// CraftBukkit start
|
||||
org.bukkit.craftbukkit.CraftWorld cworld = this.world.getWorld();
|
||||
this.bukkitChunk = (cworld == null) ? null : cworld.popPreservedChunk(i, j);
|
||||
if (this.bukkitChunk == null) {
|
||||
this.bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this);
|
||||
if (!(this instanceof EmptyChunk)) {
|
||||
org.bukkit.craftbukkit.CraftWorld cworld = this.world.getWorld();
|
||||
this.bukkitChunk = (cworld == null) ? null : cworld.popPreservedChunk(i, j);
|
||||
if (this.bukkitChunk == null) {
|
||||
this.bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user