Java 类net.minecraft.world.storage.ThreadedFileIOBase 实例源码
项目:Resilience-Client-Source
文件:AnvilChunkLoader.java
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);
}
}
项目:Cauldron
文件:AnvilChunkLoader.java
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);
}
}
项目:Cauldron
文件:AnvilChunkLoader.java
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);
}
}
项目:RuneCraftery
文件:AnvilChunkLoader.java
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);
}
}
项目:RuneCraftery
文件:AnvilChunkLoader.java
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);
}
}
项目:BetterNutritionMod
文件:AnvilChunkLoader.java
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);
}
}
项目:DecompiledMinecraft
文件:AnvilChunkLoader.java
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);
}
项目:DecompiledMinecraft
文件:AnvilSaveHandler.java
/**
* 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();
}
项目:DecompiledMinecraft
文件:AnvilChunkLoader.java
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);
}
项目:DecompiledMinecraft
文件:AnvilSaveHandler.java
/**
* 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();
}
项目:BaseClient
文件:AnvilChunkLoader.java
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);
}
项目:BaseClient
文件:AnvilSaveHandler.java
/**
* 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();
}
项目:BaseClient
文件:AnvilChunkLoader.java
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);
}
项目:BaseClient
文件:AnvilSaveHandler.java
/**
* 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();
}
项目:Backmemed
文件:AnvilChunkLoader.java
protected void addChunkToPending(ChunkPos pos, NBTTagCompound compound)
{
if (!this.pendingAnvilChunksCoordinates.contains(pos))
{
this.chunksToRemove.put(pos, compound);
}
ThreadedFileIOBase.getThreadedIOInstance().queueIO(this);
}
项目:Backmemed
文件:AnvilSaveHandler.java
/**
* 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();
}
项目:CustomWorldGen
文件:AnvilChunkLoader.java
protected void addChunkToPending(ChunkPos pos, NBTTagCompound compound)
{
if (!this.pendingAnvilChunksCoordinates.contains(pos))
{
this.chunksToRemove.put(pos, compound);
}
ThreadedFileIOBase.getThreadedIOInstance().queueIO(this);
}
项目:CustomWorldGen
文件:AnvilSaveHandler.java
/**
* 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();
}
项目:Resilience-Client-Source
文件:AnvilSaveHandler.java
/**
* 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();
}
项目:Cauldron
文件:AnvilSaveHandler.java
public void flush()
{
try
{
ThreadedFileIOBase.threadedIOInstance.waitForFinish();
}
catch (InterruptedException interruptedexception)
{
interruptedexception.printStackTrace();
}
RegionFileCache.clearRegionFileReferences();
}
项目:Cauldron
文件:AnvilSaveHandler.java
public void flush()
{
try
{
ThreadedFileIOBase.threadedIOInstance.waitForFinish();
}
catch (InterruptedException interruptedexception)
{
interruptedexception.printStackTrace();
}
RegionFileCache.clearRegionFileReferences();
}
项目:RuneCraftery
文件:AnvilSaveHandler.java
public void func_75759_a() {
try {
ThreadedFileIOBase.field_75741_a.func_75734_a();
} catch (InterruptedException var2) {
var2.printStackTrace();
}
RegionFileCache.func_76551_a();
}
项目:RuneCraftery
文件:AnvilSaveHandler.java
/**
* 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();
}
项目:BetterNutritionMod
文件:AnvilSaveHandler.java
/**
* 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();
}
项目:forge_world_downloader
文件:WDL.java
/** 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.");
}