001 package net.minecraft.src; 002 003 import cpw.mods.fml.common.Side; 004 import cpw.mods.fml.common.asm.SideOnly; 005 import net.minecraft.server.MinecraftServer; 006 007 public class ConvertProgressUpdater implements IProgressUpdate 008 { 009 /** lastTimeMillis */ 010 private long lastTimeMillis; 011 012 /** Reference to the MinecraftServer object. */ 013 final MinecraftServer mcServer; 014 015 public ConvertProgressUpdater(MinecraftServer par1MinecraftServer) 016 { 017 this.mcServer = par1MinecraftServer; 018 this.lastTimeMillis = System.currentTimeMillis(); 019 } 020 021 /** 022 * "Saving level", or the loading,or downloading equivelent 023 */ 024 public void displayProgressMessage(String par1Str) {} 025 026 /** 027 * Updates the progress bar on the loading screen to the specified amount. Args: loadProgress 028 */ 029 public void setLoadingProgress(int par1) 030 { 031 if (System.currentTimeMillis() - this.lastTimeMillis >= 1000L) 032 { 033 this.lastTimeMillis = System.currentTimeMillis(); 034 MinecraftServer.logger.info("Converting... " + par1 + "%"); 035 } 036 } 037 038 @SideOnly(Side.CLIENT) 039 040 /** 041 * this string, followed by "working..." and then the "% complete" are the 3 lines shown. This resets progress to 0, 042 * and the WorkingString to "working...". 043 */ 044 public void resetProgressAndMessage(String par1Str) {} 045 046 @SideOnly(Side.CLIENT) 047 048 /** 049 * called when there is no more progress to be had, both on completion and failure 050 */ 051 public void onNoMoreProgress() {} 052 053 /** 054 * This is called with "Working..." by resetProgressAndMessage 055 */ 056 public void resetProgresAndWorkingMessage(String par1Str) {} 057 }