本文整理汇总了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);
}
}
}
}
示例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);
}
}
示例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));
}
}
示例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);
}
}
}
}