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