當前位置: 首頁>>代碼示例>>Java>>正文


Java IProgressUpdate.displayProgressMessage方法代碼示例

本文整理匯總了Java中net.minecraft.util.IProgressUpdate.displayProgressMessage方法的典型用法代碼示例。如果您正苦於以下問題:Java IProgressUpdate.displayProgressMessage方法的具體用法?Java IProgressUpdate.displayProgressMessage怎麽用?Java IProgressUpdate.displayProgressMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.util.IProgressUpdate的用法示例。


在下文中一共展示了IProgressUpdate.displayProgressMessage方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: saveAllChunks

import net.minecraft.util.IProgressUpdate; //導入方法依賴的package包/類
/**
 * Saves all chunks to disk while updating progress bar.
 */
public void saveAllChunks(final boolean saveAll, final IProgressUpdate progress) throws MinecraftException {
	if (this.chunkProvider.canSave()) {
		if (progress != null) {
			progress.displayProgressMessage("Saving level");
		}

		this.saveLevel();

		if (progress != null) {
			progress.resetProgresAndWorkingMessage("Saving chunks");
		}

		this.chunkProvider.saveChunks(saveAll, progress);
		MinecraftForge.EVENT_BUS.post(new WorldEvent.Save(this));

		for (final Chunk chunk : this.theChunkProviderServer.func_152380_a()) {
			if (chunk != null && !this.thePlayerManager.func_152621_a(chunk.xPosition, chunk.zPosition)) {
				this.theChunkProviderServer.unloadChunksIfNotNearSpawn(chunk.xPosition, chunk.zPosition);
			}
		}
	}
}
 
開發者ID:OreCruncher,項目名稱:Jiffy,代碼行數:26,代碼來源:WorldServer.java

示例2: saveAllChunks

import net.minecraft.util.IProgressUpdate; //導入方法依賴的package包/類
/**
 * Saves all chunks to disk while updating progress bar.
 */
public void saveAllChunks(boolean par1, IProgressUpdate par2IProgressUpdate) throws MinecraftException
{
    if (this.chunkProvider.canSave())
    {
        if (par2IProgressUpdate != null)
        {
            par2IProgressUpdate.displayProgressMessage("Saving level");
        }

        this.saveLevel();

        if (par2IProgressUpdate != null)
        {
            par2IProgressUpdate.resetProgresAndWorkingMessage("Saving chunks");
        }

        this.chunkProvider.saveChunks(par1, par2IProgressUpdate);
    }
}
 
開發者ID:MinecraftModdedClients,項目名稱:Resilience-Client-Source,代碼行數:23,代碼來源:WorldServer.java

示例3: saveAllChunks

import net.minecraft.util.IProgressUpdate; //導入方法依賴的package包/類
/**
 * Saves all chunks to disk while updating progress bar.
 */
public void saveAllChunks(boolean par1, IProgressUpdate par2IProgressUpdate) throws MinecraftException
{
    if (this.chunkProvider.canSave())
    {
        if (par2IProgressUpdate != null)
        {
            par2IProgressUpdate.displayProgressMessage("Saving level");
        }

        this.saveLevel();

        if (par2IProgressUpdate != null)
        {
            par2IProgressUpdate.resetProgresAndWorkingMessage("Saving chunks");
        }

        this.chunkProvider.saveChunks(par1, par2IProgressUpdate);
        MinecraftForge.EVENT_BUS.post(new WorldEvent.Save(this));
    }
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:24,代碼來源:WorldServer.java

示例4: saveAllChunks

import net.minecraft.util.IProgressUpdate; //導入方法依賴的package包/類
public void saveAllChunks(boolean p_73044_1_, IProgressUpdate p_73044_2_) throws MinecraftException
{
    if (this.chunkProvider.canSave())
    {
        if (p_73044_2_ != null)
        {
            p_73044_2_.displayProgressMessage("Saving level");
        }

        this.saveLevel();

        if (p_73044_2_ != null)
        {
            p_73044_2_.resetProgresAndWorkingMessage("Saving chunks");
        }

        this.chunkProvider.saveChunks(p_73044_1_, p_73044_2_);
        MinecraftForge.EVENT_BUS.post(new WorldEvent.Save(this));
        ArrayList arraylist = Lists.newArrayList(this.theChunkProviderServer.func_152380_a());
        Iterator iterator = arraylist.iterator();

        while (iterator.hasNext())
        {
            Chunk chunk = (Chunk)iterator.next();

            if (chunk != null && !this.thePlayerManager.func_152621_a(chunk.xPosition, chunk.zPosition))
            {
                this.theChunkProviderServer.unloadChunksIfNotNearSpawn(chunk.xPosition, chunk.zPosition);
            }
        }
    }
}
 
開發者ID:xtrafrancyz,項目名稱:Cauldron,代碼行數:33,代碼來源:WorldServer.java


注:本文中的net.minecraft.util.IProgressUpdate.displayProgressMessage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。