当前位置: 首页>>代码示例>>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;未经允许,请勿转载。