当前位置: 首页>>代码示例>>Java>>正文


Java ThreadedFileIOBase类代码示例

本文整理汇总了Java中net.minecraft.world.storage.ThreadedFileIOBase的典型用法代码示例。如果您正苦于以下问题:Java ThreadedFileIOBase类的具体用法?Java ThreadedFileIOBase怎么用?Java ThreadedFileIOBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ThreadedFileIOBase类属于net.minecraft.world.storage包,在下文中一共展示了ThreadedFileIOBase类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addChunkToPending

import net.minecraft.world.storage.ThreadedFileIOBase; //导入依赖的package包/类
protected void addChunkToPending(ChunkCoordIntPair par1ChunkCoordIntPair, NBTTagCompound par2NBTTagCompound)
{
    Object var3 = this.syncLockObject;

    synchronized (this.syncLockObject)
    {
        if (this.pendingAnvilChunksCoordinates.contains(par1ChunkCoordIntPair))
        {
            for (int var4 = 0; var4 < this.chunksToRemove.size(); ++var4)
            {
                if (((AnvilChunkLoader.PendingChunk)this.chunksToRemove.get(var4)).chunkCoordinate.equals(par1ChunkCoordIntPair))
                {
                    this.chunksToRemove.set(var4, new AnvilChunkLoader.PendingChunk(par1ChunkCoordIntPair, par2NBTTagCompound));
                    return;
                }
            }
        }

        this.chunksToRemove.add(new AnvilChunkLoader.PendingChunk(par1ChunkCoordIntPair, par2NBTTagCompound));
        this.pendingAnvilChunksCoordinates.add(par1ChunkCoordIntPair);
        ThreadedFileIOBase.threadedIOInstance.queueIO(this);
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:24,代码来源:AnvilChunkLoader.java

示例2: addChunkToPending

import net.minecraft.world.storage.ThreadedFileIOBase; //导入依赖的package包/类
protected void addChunkToPending(ChunkCoordIntPair p_75824_1_, NBTTagCompound p_75824_2_)
{
    Object object = this.syncLockObject;

    synchronized (this.syncLockObject)
    {
        if (this.pendingAnvilChunksCoordinates.contains(p_75824_1_))
        {
            for (int i = 0; i < this.chunksToRemove.size(); ++i)
            {
                if (((AnvilChunkLoader.PendingChunk)this.chunksToRemove.get(i)).chunkCoordinate.equals(p_75824_1_))
                {
                    this.chunksToRemove.set(i, new AnvilChunkLoader.PendingChunk(p_75824_1_, p_75824_2_));
                    return;
                }
            }
        }

        this.chunksToRemove.add(new AnvilChunkLoader.PendingChunk(p_75824_1_, p_75824_2_));
        this.pendingAnvilChunksCoordinates.add(p_75824_1_);
        ThreadedFileIOBase.threadedIOInstance.queueIO(this);
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:24,代码来源:AnvilChunkLoader.java

示例3: func_75824_a

import net.minecraft.world.storage.ThreadedFileIOBase; //导入依赖的package包/类
protected void func_75824_a(ChunkCoordIntPair p_75824_1_, NBTTagCompound p_75824_2_) {
   Object var3 = this.field_75827_c;
   synchronized(this.field_75827_c) {
      if(this.field_75826_b.contains(p_75824_1_)) {
         for(int var4 = 0; var4 < this.field_75828_a.size(); ++var4) {
            if(((AnvilChunkLoaderPending)this.field_75828_a.get(var4)).field_76548_a.equals(p_75824_1_)) {
               this.field_75828_a.set(var4, new AnvilChunkLoaderPending(p_75824_1_, p_75824_2_));
               return;
            }
         }
      }

      this.field_75828_a.add(new AnvilChunkLoaderPending(p_75824_1_, p_75824_2_));
      this.field_75826_b.add(p_75824_1_);
      ThreadedFileIOBase.field_75741_a.func_75735_a(this);
   }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:18,代码来源:AnvilChunkLoader.java

示例4: addChunkToPending

import net.minecraft.world.storage.ThreadedFileIOBase; //导入依赖的package包/类
protected void addChunkToPending(ChunkCoordIntPair par1ChunkCoordIntPair, NBTTagCompound par2NBTTagCompound)
{
    Object object = this.syncLockObject;

    synchronized (this.syncLockObject)
    {
        if (this.pendingAnvilChunksCoordinates.contains(par1ChunkCoordIntPair))
        {
            for (int i = 0; i < this.chunksToRemove.size(); ++i)
            {
                if (((AnvilChunkLoaderPending)this.chunksToRemove.get(i)).chunkCoordinate.equals(par1ChunkCoordIntPair))
                {
                    this.chunksToRemove.set(i, new AnvilChunkLoaderPending(par1ChunkCoordIntPair, par2NBTTagCompound));
                    return;
                }
            }
        }

        this.chunksToRemove.add(new AnvilChunkLoaderPending(par1ChunkCoordIntPair, par2NBTTagCompound));
        this.pendingAnvilChunksCoordinates.add(par1ChunkCoordIntPair);
        ThreadedFileIOBase.threadedIOInstance.queueIO(this);
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:24,代码来源:AnvilChunkLoader.java

示例5: addChunkToPending

import net.minecraft.world.storage.ThreadedFileIOBase; //导入依赖的package包/类
protected void addChunkToPending(ChunkCoordIntPair p_75824_1_, NBTTagCompound p_75824_2_)
{
    if (!this.pendingAnvilChunksCoordinates.contains(p_75824_1_))
    {
        this.chunksToRemove.put(p_75824_1_, p_75824_2_);
    }

    ThreadedFileIOBase.getThreadedIOInstance().queueIO(this);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:10,代码来源:AnvilChunkLoader.java

示例6: flush

import net.minecraft.world.storage.ThreadedFileIOBase; //导入依赖的package包/类
/**
 * Called to flush all changes to disk, waiting for them to complete.
 */
public void flush()
{
    try
    {
        ThreadedFileIOBase.getThreadedIOInstance().waitForFinish();
    }
    catch (InterruptedException interruptedexception)
    {
        interruptedexception.printStackTrace();
    }

    RegionFileCache.clearRegionFileReferences();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:17,代码来源:AnvilSaveHandler.java

示例7: addChunkToPending

import net.minecraft.world.storage.ThreadedFileIOBase; //导入依赖的package包/类
protected void addChunkToPending(ChunkPos pos, NBTTagCompound compound)
{
    if (!this.pendingAnvilChunksCoordinates.contains(pos))
    {
        this.chunksToRemove.put(pos, compound);
    }

    ThreadedFileIOBase.getThreadedIOInstance().queueIO(this);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:10,代码来源:AnvilChunkLoader.java

示例8: flush

import net.minecraft.world.storage.ThreadedFileIOBase; //导入依赖的package包/类
/**
 * Called to flush all changes to disk, waiting for them to complete.
 */
public void flush()
{
    try
    {
        ThreadedFileIOBase.threadedIOInstance.waitForFinish();
    }
    catch (InterruptedException var2)
    {
        var2.printStackTrace();
    }

    RegionFileCache.clearRegionFileReferences();
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:17,代码来源:AnvilSaveHandler.java

示例9: flush

import net.minecraft.world.storage.ThreadedFileIOBase; //导入依赖的package包/类
public void flush()
{
    try
    {
        ThreadedFileIOBase.threadedIOInstance.waitForFinish();
    }
    catch (InterruptedException interruptedexception)
    {
        interruptedexception.printStackTrace();
    }

    RegionFileCache.clearRegionFileReferences();
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:14,代码来源:AnvilSaveHandler.java

示例10: func_75759_a

import net.minecraft.world.storage.ThreadedFileIOBase; //导入依赖的package包/类
public void func_75759_a() {
   try {
      ThreadedFileIOBase.field_75741_a.func_75734_a();
   } catch (InterruptedException var2) {
      var2.printStackTrace();
   }

   RegionFileCache.func_76551_a();
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:10,代码来源:AnvilSaveHandler.java

示例11: flush

import net.minecraft.world.storage.ThreadedFileIOBase; //导入依赖的package包/类
/**
 * Called to flush all changes to disk, waiting for them to complete.
 */
public void flush()
{
    try
    {
        ThreadedFileIOBase.threadedIOInstance.waitForFinish();
    }
    catch (InterruptedException interruptedexception)
    {
        interruptedexception.printStackTrace();
    }

    RegionFileCache.clearRegionFileReferences();
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:17,代码来源:AnvilSaveHandler.java

示例12: saveChunks

import net.minecraft.world.storage.ThreadedFileIOBase; //导入依赖的package包/类
/** Calls saveChunk for all currently loaded chunks */
public static void saveChunks( )
{
	chatDebug( "Saving chunks...");
	WDLLongHashMapWrapper chunkMapping = (WDLLongHashMapWrapper) Reflexion.stealField( ChunkProviderClient.class, LongHashMap.class ).get(wc.getChunkProvider());
	
	//LongHashMapEntry[] hashArray = (LongHashMapEntry[]) Reflexion.stealField( LongHashMap.class, LongHashMapEntry[].class ).get(chunkMapping);
	
	WDLSaveProgressReporter progressReporter = new WDLSaveProgressReporter();
	progressReporter.start();
	
	/*// Now that we have the HashMap, lets start iterating over it:
	for( LongHashMapEntry lhme : hashArray )
	{
		while( lhme != null )
		{
			Chunk c = (Chunk) lhme.getValue();*/
	for (Chunk c:chunkMapping.getChunks())
	{
			if( c != null /*&& c.isModified*/ ) // only save filled chunks
			{
				saveChunk( c );
			}
			//else
			//	chatMsg( "Didn't save chunk " + c.xPosition + " " + c.zPosition + " because it is null!");
			/*
			lhme = lhme.nextEntry; // Get next Entry in this linked list
		}
	}*/
	}
	
	try
	{
		ThreadedFileIOBase.threadedIOInstance.waitForFinish();
	}
	catch(Exception e)
	{
		chatMsg( "Threw exception waiting for asynchronous IO to finish. Hmmm.");
	}
	chatDebug( "Chunk data saved.");
}
 
开发者ID:xurei,项目名称:forge_world_downloader,代码行数:42,代码来源:WDL.java


注:本文中的net.minecraft.world.storage.ThreadedFileIOBase类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。