Search in sources :

Example 6 with ChunkCoordIntPair

use of net.minecraft.server.v1_14_R1.ChunkCoordIntPair in project dynmap by webbukkit.

the class MapChunkCache116_2 method loadChunk.

// Load generic chunk from unloaded chunk
protected GenericChunk loadChunk(DynmapChunk chunk) {
    CraftWorld cw = (CraftWorld) w;
    NBTTagCompound nbt = null;
    ChunkCoordIntPair cc = new ChunkCoordIntPair(chunk.x, chunk.z);
    GenericChunk gc = null;
    try {
        nbt = cw.getHandle().getChunkProvider().playerChunkMap.read(cc);
    } catch (IOException iox) {
    }
    if (nbt != null) {
        gc = parseChunkFromNBT(new NBT.NBTCompound(nbt));
    }
    return gc;
}
Also used : ChunkCoordIntPair(net.minecraft.server.v1_16_R2.ChunkCoordIntPair) GenericChunk(org.dynmap.common.chunk.GenericChunk) NBTTagCompound(net.minecraft.server.v1_16_R2.NBTTagCompound) IOException(java.io.IOException) CraftWorld(org.bukkit.craftbukkit.v1_16_R2.CraftWorld)

Aggregations

IOException (java.io.IOException)5 GenericChunk (org.dynmap.common.chunk.GenericChunk)5 ChunkCoordIntPair (net.minecraft.server.v1_15_R1.ChunkCoordIntPair)2 ChunkCoordIntPair (net.minecraft.server.v1_16_R2.ChunkCoordIntPair)2 NBTTagCompound (net.minecraft.server.v1_16_R2.NBTTagCompound)2 CraftWorld (org.bukkit.craftbukkit.v1_16_R2.CraftWorld)2 ChunkCoordIntPair (net.minecraft.server.v1_14_R1.ChunkCoordIntPair)1 NBTTagCompound (net.minecraft.server.v1_14_R1.NBTTagCompound)1 BlockPosition (net.minecraft.server.v1_15_R1.BlockPosition)1 NBTTagCompound (net.minecraft.server.v1_15_R1.NBTTagCompound)1 PacketPlayOutMultiBlockChange (net.minecraft.server.v1_15_R1.PacketPlayOutMultiBlockChange)1 ChunkCoordIntPair (net.minecraft.server.v1_16_R1.ChunkCoordIntPair)1 NBTTagCompound (net.minecraft.server.v1_16_R1.NBTTagCompound)1 BlockData (org.bukkit.block.data.BlockData)1 CraftWorld (org.bukkit.craftbukkit.v1_14_R1.CraftWorld)1 CraftWorld (org.bukkit.craftbukkit.v1_15_R1.CraftWorld)1 CraftBlockData (org.bukkit.craftbukkit.v1_15_R1.block.data.CraftBlockData)1 CraftWorld (org.bukkit.craftbukkit.v1_16_R1.CraftWorld)1 ParallelChunk (thpmc.engine.api.world.parallel.ParallelChunk)1 ParallelUniverse (thpmc.engine.api.world.parallel.ParallelUniverse)1