mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 08:17:44 +01:00
SPIGOT-7332: Persistent Data Container of Chunk not saving on stop or restart.
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
parent
c01ce41ff3
commit
4147116921
@ -30,6 +30,7 @@ import net.minecraft.world.level.chunk.DataPaletteBlock;
|
||||
import net.minecraft.world.level.chunk.IChunkAccess;
|
||||
import net.minecraft.world.level.chunk.NibbleArray;
|
||||
import net.minecraft.world.level.chunk.PalettedContainerRO;
|
||||
import net.minecraft.world.level.chunk.ProtoChunkExtension;
|
||||
import net.minecraft.world.level.chunk.storage.ChunkRegionLoader;
|
||||
import net.minecraft.world.level.chunk.storage.EntityStorage;
|
||||
import net.minecraft.world.level.entity.PersistentEntitySectionManager;
|
||||
@ -78,7 +79,14 @@ public class CraftChunk implements Chunk {
|
||||
}
|
||||
|
||||
public IChunkAccess getHandle(ChunkStatus chunkStatus) {
|
||||
return worldServer.getChunk(x, z, chunkStatus);
|
||||
IChunkAccess chunkAccess = worldServer.getChunk(x, z, chunkStatus);
|
||||
|
||||
// SPIGOT-7332: Get unwrapped extension
|
||||
if (chunkAccess instanceof ProtoChunkExtension extension) {
|
||||
return extension.getWrapped();
|
||||
}
|
||||
|
||||
return chunkAccess;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user