Java 类net.minecraft.server.ChunkRegionLoader 实例源码

项目:CraftBukkit    文件:QueuedChunk.java   
public QueuedChunk(int x, int z, ChunkRegionLoader loader, World world, ChunkProviderServer provider) {
    this.x = x;
    this.z = z;
    this.loader = loader;
    this.world = world;
    this.provider = provider;
}
项目:CraftBukkit    文件:ChunkIOProvider.java   
public Chunk callStage1(QueuedChunk queuedChunk) throws RuntimeException {
    ChunkRegionLoader loader = queuedChunk.loader;
    Object[] data = loader.loadChunk(queuedChunk.world, queuedChunk.x, queuedChunk.z);

    if (data != null) {
        queuedChunk.compound = (NBTTagCompound) data[1];
        return (Chunk) data[0];
    }

    return null;
}
项目:Craftbukkit    文件:QueuedChunk.java   
public QueuedChunk(int x, int z, ChunkRegionLoader loader, World world, ChunkProviderServer provider) {
    this.x = x;
    this.z = z;
    this.loader = loader;
    this.world = world;
    this.provider = provider;
}
项目:Craftbukkit    文件:ChunkIOProvider.java   
public Chunk callStage1(QueuedChunk queuedChunk) throws RuntimeException {
    try {
        ChunkRegionLoader loader = queuedChunk.loader;
        Object[] data = loader.loadChunk(queuedChunk.world, queuedChunk.x, queuedChunk.z);

        if (data != null) {
            queuedChunk.compound = (NBTTagCompound) data[1];
            return (Chunk) data[0];
        }

        return null;
    } catch (IOException ex) {
        throw new RuntimeException(ex);
    }
}
项目:Almura-Server    文件:ChunkIOProvider.java   
public Chunk callStage1(QueuedChunk queuedChunk) throws RuntimeException {
    ChunkRegionLoader loader = queuedChunk.loader;
    Object[] data = loader.loadChunk(queuedChunk.world, LongHash.msw(queuedChunk.coords), LongHash.lsw(queuedChunk.coords));

    if (data != null) {
        queuedChunk.compound = (NBTTagCompound) data[1];
        return (Chunk) data[0];
    }

    return null;
}
项目:Tweakkit-Server    文件:QueuedChunk.java   
public QueuedChunk(int x, int z, ChunkRegionLoader loader, World world, ChunkProviderServer provider) {
    this.x = x;
    this.z = z;
    this.loader = loader;
    this.world = world;
    this.provider = provider;
}
项目:Tweakkit-Server    文件:ChunkIOProvider.java   
public Chunk callStage1(QueuedChunk queuedChunk) throws RuntimeException {
    ChunkRegionLoader loader = queuedChunk.loader;
    Object[] data = loader.loadChunk(queuedChunk.world, queuedChunk.x, queuedChunk.z);

    if (data != null) {
        queuedChunk.compound = (NBTTagCompound) data[1];
        return (Chunk) data[0];
    }

    return null;
}
项目:SpigotSource    文件:QueuedChunk.java   
public QueuedChunk(int x, int z, ChunkRegionLoader loader, World world, ChunkProviderServer provider) {
    this.x = x;
    this.z = z;
    this.loader = loader;
    this.world = world;
    this.provider = provider;
}
项目:SpigotSource    文件:ChunkIOProvider.java   
public Chunk callStage1(QueuedChunk queuedChunk) throws RuntimeException {
    try {
        ChunkRegionLoader loader = queuedChunk.loader;
        Object[] data = loader.loadChunk(queuedChunk.world, queuedChunk.x, queuedChunk.z);

        if (data != null) {
            queuedChunk.compound = (NBTTagCompound) data[1];
            return (Chunk) data[0];
        }

        return null;
    } catch (IOException ex) {
        throw new RuntimeException(ex);
    }
}
项目:Craft-city    文件:ChunkIOProvider.java   
public Chunk callStage1(QueuedChunk queuedChunk) throws RuntimeException {
    ChunkRegionLoader loader = queuedChunk.loader;
    Object[] data = loader.loadChunk(queuedChunk.world, LongHash.msw(queuedChunk.coords), LongHash.lsw(queuedChunk.coords));

    if (data != null) {
        queuedChunk.compound = (NBTTagCompound) data[1];
        return (Chunk) data[0];
    }

    return null;
}
项目:CraftBukkit    文件:ChunkIOExecutor.java   
public static Chunk syncChunkLoad(World world, ChunkRegionLoader loader, ChunkProviderServer provider, int x, int z) {
    return instance.getSkipQueue(new QueuedChunk(x, z, loader, world, provider));
}
项目:CraftBukkit    文件:ChunkIOExecutor.java   
public static void queueChunkLoad(World world, ChunkRegionLoader loader, ChunkProviderServer provider, int x, int z, Runnable runnable) {
    instance.add(new QueuedChunk(x, z, loader, world, provider), runnable);
}
项目:Craftbukkit    文件:ChunkIOExecutor.java   
public static Chunk syncChunkLoad(World world, ChunkRegionLoader loader, ChunkProviderServer provider, int x, int z) {
    return instance.getSkipQueue(new QueuedChunk(x, z, loader, world, provider));
}
项目:Craftbukkit    文件:ChunkIOExecutor.java   
public static void queueChunkLoad(World world, ChunkRegionLoader loader, ChunkProviderServer provider, int x, int z, Runnable runnable) {
    instance.add(new QueuedChunk(x, z, loader, world, provider), runnable);
}
项目:Almura-Server    文件:QueuedChunk.java   
public QueuedChunk(long coords, ChunkRegionLoader loader, World world, ChunkProviderServer provider) {
    this.coords = coords;
    this.loader = loader;
    this.world = world;
    this.provider = provider;
}
项目:Almura-Server    文件:ChunkIOExecutor.java   
public static void queueChunkLoad(World world, ChunkRegionLoader loader, ChunkProviderServer provider, int x, int z, Runnable runnable) {
    instance.add(new QueuedChunk(LongHash.toLong(x, z), loader, world, provider), runnable);
}
项目:Tweakkit-Server    文件:ChunkIOExecutor.java   
public static Chunk syncChunkLoad(World world, ChunkRegionLoader loader, ChunkProviderServer provider, int x, int z) {
    return instance.getSkipQueue(new QueuedChunk(x, z, loader, world, provider));
}
项目:Tweakkit-Server    文件:ChunkIOExecutor.java   
public static void queueChunkLoad(World world, ChunkRegionLoader loader, ChunkProviderServer provider, int x, int z, Runnable runnable) {
    instance.add(new QueuedChunk(x, z, loader, world, provider), runnable);
}
项目:SpigotSource    文件:ChunkIOExecutor.java   
public static Chunk syncChunkLoad(World world, ChunkRegionLoader loader, ChunkProviderServer provider, int x, int z) {
    return instance.getSkipQueue(new QueuedChunk(x, z, loader, world, provider));
}
项目:SpigotSource    文件:ChunkIOExecutor.java   
public static void queueChunkLoad(World world, ChunkRegionLoader loader, ChunkProviderServer provider, int x, int z, Runnable runnable) {
    instance.add(new QueuedChunk(x, z, loader, world, provider), runnable);
}
项目:Craft-city    文件:QueuedChunk.java   
public QueuedChunk(long coords, ChunkRegionLoader loader, World world, ChunkProviderServer provider) {
    this.coords = coords;
    this.loader = loader;
    this.world = world;
    this.provider = provider;
}
项目:Craft-city    文件:ChunkIOExecutor.java   
public static void queueChunkLoad(World world, ChunkRegionLoader loader, ChunkProviderServer provider, int x, int z, Runnable runnable) {
    instance.add(new QueuedChunk(LongHash.toLong(x, z), loader, world, provider), runnable);
}