#672: Add PersistentDataHolder to Chunk

By: Nesaak <52047222+Nesaak@users.noreply.github.com>
This commit is contained in:
CraftBukkit/Spigot
2020-10-17 17:37:49 +11:00
parent a3cf5aea1a
commit 071360817a
3 changed files with 79 additions and 13 deletions

View File

@@ -34,6 +34,7 @@ import org.bukkit.craftbukkit.block.CraftBlock;
import org.bukkit.craftbukkit.block.data.CraftBlockData;
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
import org.bukkit.entity.Entity;
import org.bukkit.persistence.PersistentDataContainer;
import org.bukkit.plugin.Plugin;
public class CraftChunk implements Chunk {
@@ -296,6 +297,11 @@ public class CraftChunk implements Chunk {
return new CraftChunkSnapshot(getX(), getZ(), world.getName(), world.getFullTime(), sectionBlockIDs, sectionSkyLights, sectionEmitLights, sectionEmpty, hmap, biome);
}
@Override
public PersistentDataContainer getPersistentDataContainer() {
return getHandle().persistentDataContainer;
}
public static ChunkSnapshot getEmptyChunkSnapshot(int x, int z, CraftWorld world, boolean includeBiome, boolean includeBiomeTempRain) {
BiomeStorage biome = null;