• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ThreadedFileIOBase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IndexHelper类代码示例发布时间:2022-05-22
下一篇:
Java NormalParserData类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap