本文整理匯總了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);
}
}
}
}