当前位置: 首页>>代码示例>>Java>>正文


Java IProgressUpdate.setLoadingProgress方法代码示例

本文整理汇总了Java中net.minecraft.util.IProgressUpdate.setLoadingProgress方法的典型用法代码示例。如果您正苦于以下问题:Java IProgressUpdate.setLoadingProgress方法的具体用法?Java IProgressUpdate.setLoadingProgress怎么用?Java IProgressUpdate.setLoadingProgress使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.util.IProgressUpdate的用法示例。


在下文中一共展示了IProgressUpdate.setLoadingProgress方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: convertFile

import net.minecraft.util.IProgressUpdate; //导入方法依赖的package包/类
private void convertFile(File p_75813_1_, Iterable<File> p_75813_2_, WorldChunkManager p_75813_3_, int p_75813_4_, int p_75813_5_, IProgressUpdate p_75813_6_)
{
    for (File file1 : p_75813_2_)
    {
        this.convertChunks(p_75813_1_, file1, p_75813_3_, p_75813_4_, p_75813_5_, p_75813_6_);
        ++p_75813_4_;
        int i = (int)Math.round(100.0D * (double)p_75813_4_ / (double)p_75813_5_);
        p_75813_6_.setLoadingProgress(i);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:11,代码来源:AnvilSaveConverter.java

示例2: convertFile

import net.minecraft.util.IProgressUpdate; //导入方法依赖的package包/类
private void convertFile(File baseFolder, Iterable<File> regionFiles, BiomeProvider p_75813_3_, int p_75813_4_, int p_75813_5_, IProgressUpdate progress)
{
    for (File file1 : regionFiles)
    {
        this.convertChunks(baseFolder, file1, p_75813_3_, p_75813_4_, p_75813_5_, progress);
        ++p_75813_4_;
        int i = (int)Math.round(100.0D * (double)p_75813_4_ / (double)p_75813_5_);
        progress.setLoadingProgress(i);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:11,代码来源:AnvilSaveConverter.java

示例3: convertFile

import net.minecraft.util.IProgressUpdate; //导入方法依赖的package包/类
private void convertFile(File par1File, Iterable par2Iterable, WorldChunkManager par3WorldChunkManager, int par4, int par5, IProgressUpdate par6IProgressUpdate)
{
    Iterator var7 = par2Iterable.iterator();

    while (var7.hasNext())
    {
        File var8 = (File)var7.next();
        this.convertChunks(par1File, var8, par3WorldChunkManager, par4, par5, par6IProgressUpdate);
        ++par4;
        int var9 = (int)Math.round(100.0D * (double)par4 / (double)par5);
        par6IProgressUpdate.setLoadingProgress(var9);
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:14,代码来源:AnvilSaveConverter.java

示例4: convertFile

import net.minecraft.util.IProgressUpdate; //导入方法依赖的package包/类
private void convertFile(File p_75813_1_, Iterable p_75813_2_, WorldChunkManager p_75813_3_, int p_75813_4_, int p_75813_5_, IProgressUpdate p_75813_6_)
{
    Iterator iterator = p_75813_2_.iterator();

    while (iterator.hasNext())
    {
        File file2 = (File)iterator.next();
        this.convertChunks(p_75813_1_, file2, p_75813_3_, p_75813_4_, p_75813_5_, p_75813_6_);
        ++p_75813_4_;
        int k = (int)Math.round(100.0D * (double)p_75813_4_ / (double)p_75813_5_);
        p_75813_6_.setLoadingProgress(k);
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:14,代码来源:AnvilSaveConverter.java

示例5: convertFile

import net.minecraft.util.IProgressUpdate; //导入方法依赖的package包/类
private void convertFile(File par1File, Iterable par2Iterable, WorldChunkManager par3WorldChunkManager, int par4, int par5, IProgressUpdate par6IProgressUpdate)
{
    Iterator iterator = par2Iterable.iterator();

    while (iterator.hasNext())
    {
        File file2 = (File)iterator.next();
        this.convertChunks(par1File, file2, par3WorldChunkManager, par4, par5, par6IProgressUpdate);
        ++par4;
        int k = (int)Math.round(100.0D * (double)par4 / (double)par5);
        par6IProgressUpdate.setLoadingProgress(k);
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:14,代码来源:AnvilSaveConverter.java

示例6: convertChunks

import net.minecraft.util.IProgressUpdate; //导入方法依赖的package包/类
/**
 * copies a 32x32 chunk set from par2File to par1File, via AnvilConverterData
 */
private void convertChunks(File p_75811_1_, File p_75811_2_, WorldChunkManager p_75811_3_, int p_75811_4_, int p_75811_5_, IProgressUpdate progressCallback)
{
    try
    {
        String s = p_75811_2_.getName();
        RegionFile regionfile = new RegionFile(p_75811_2_);
        RegionFile regionfile1 = new RegionFile(new File(p_75811_1_, s.substring(0, s.length() - ".mcr".length()) + ".mca"));

        for (int i = 0; i < 32; ++i)
        {
            for (int j = 0; j < 32; ++j)
            {
                if (regionfile.isChunkSaved(i, j) && !regionfile1.isChunkSaved(i, j))
                {
                    DataInputStream datainputstream = regionfile.getChunkDataInputStream(i, j);

                    if (datainputstream == null)
                    {
                        logger.warn("Failed to fetch input stream");
                    }
                    else
                    {
                        NBTTagCompound nbttagcompound = CompressedStreamTools.read(datainputstream);
                        datainputstream.close();
                        NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag("Level");
                        ChunkLoader.AnvilConverterData chunkloader$anvilconverterdata = ChunkLoader.load(nbttagcompound1);
                        NBTTagCompound nbttagcompound2 = new NBTTagCompound();
                        NBTTagCompound nbttagcompound3 = new NBTTagCompound();
                        nbttagcompound2.setTag("Level", nbttagcompound3);
                        ChunkLoader.convertToAnvilFormat(chunkloader$anvilconverterdata, nbttagcompound3, p_75811_3_);
                        DataOutputStream dataoutputstream = regionfile1.getChunkDataOutputStream(i, j);
                        CompressedStreamTools.write(nbttagcompound2, dataoutputstream);
                        dataoutputstream.close();
                    }
                }
            }

            int k = (int)Math.round(100.0D * (double)(p_75811_4_ * 1024) / (double)(p_75811_5_ * 1024));
            int l = (int)Math.round(100.0D * (double)((i + 1) * 32 + p_75811_4_ * 1024) / (double)(p_75811_5_ * 1024));

            if (l > k)
            {
                progressCallback.setLoadingProgress(l);
            }
        }

        regionfile.close();
        regionfile1.close();
    }
    catch (IOException ioexception)
    {
        ioexception.printStackTrace();
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:58,代码来源:AnvilSaveConverter.java

示例7: convertChunks

import net.minecraft.util.IProgressUpdate; //导入方法依赖的package包/类
/**
 * copies a 32x32 chunk set from par2File to par1File, via AnvilConverterData
 */
private void convertChunks(File baseFolder, File p_75811_2_, BiomeProvider biomeSource, int p_75811_4_, int p_75811_5_, IProgressUpdate progressCallback)
{
    try
    {
        String s = p_75811_2_.getName();
        RegionFile regionfile = new RegionFile(p_75811_2_);
        RegionFile regionfile1 = new RegionFile(new File(baseFolder, s.substring(0, s.length() - ".mcr".length()) + ".mca"));

        for (int i = 0; i < 32; ++i)
        {
            for (int j = 0; j < 32; ++j)
            {
                if (regionfile.isChunkSaved(i, j) && !regionfile1.isChunkSaved(i, j))
                {
                    DataInputStream datainputstream = regionfile.getChunkDataInputStream(i, j);

                    if (datainputstream == null)
                    {
                        LOGGER.warn("Failed to fetch input stream");
                    }
                    else
                    {
                        NBTTagCompound nbttagcompound = CompressedStreamTools.read(datainputstream);
                        datainputstream.close();
                        NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag("Level");
                        ChunkLoader.AnvilConverterData chunkloader$anvilconverterdata = ChunkLoader.load(nbttagcompound1);
                        NBTTagCompound nbttagcompound2 = new NBTTagCompound();
                        NBTTagCompound nbttagcompound3 = new NBTTagCompound();
                        nbttagcompound2.setTag("Level", nbttagcompound3);
                        ChunkLoader.convertToAnvilFormat(chunkloader$anvilconverterdata, nbttagcompound3, biomeSource);
                        DataOutputStream dataoutputstream = regionfile1.getChunkDataOutputStream(i, j);
                        CompressedStreamTools.write(nbttagcompound2, dataoutputstream);
                        dataoutputstream.close();
                    }
                }
            }

            int k = (int)Math.round(100.0D * (double)(p_75811_4_ * 1024) / (double)(p_75811_5_ * 1024));
            int l = (int)Math.round(100.0D * (double)((i + 1) * 32 + p_75811_4_ * 1024) / (double)(p_75811_5_ * 1024));

            if (l > k)
            {
                progressCallback.setLoadingProgress(l);
            }
        }

        regionfile.close();
        regionfile1.close();
    }
    catch (IOException ioexception)
    {
        ioexception.printStackTrace();
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:58,代码来源:AnvilSaveConverter.java

示例8: convertChunks

import net.minecraft.util.IProgressUpdate; //导入方法依赖的package包/类
/**
 * copies a 32x32 chunk set from par2File to par1File, via AnvilConverterData
 */
private void convertChunks(File par1File, File par2File, WorldChunkManager par3WorldChunkManager, int par4, int par5, IProgressUpdate par6IProgressUpdate)
{
    try
    {
        String var7 = par2File.getName();
        RegionFile var8 = new RegionFile(par2File);
        RegionFile var9 = new RegionFile(new File(par1File, var7.substring(0, var7.length() - ".mcr".length()) + ".mca"));

        for (int var10 = 0; var10 < 32; ++var10)
        {
            int var11;

            for (var11 = 0; var11 < 32; ++var11)
            {
                if (var8.isChunkSaved(var10, var11) && !var9.isChunkSaved(var10, var11))
                {
                    DataInputStream var12 = var8.getChunkDataInputStream(var10, var11);

                    if (var12 == null)
                    {
                        logger.warn("Failed to fetch input stream");
                    }
                    else
                    {
                        NBTTagCompound var13 = CompressedStreamTools.read(var12);
                        var12.close();
                        NBTTagCompound var14 = var13.getCompoundTag("Level");
                        ChunkLoader.AnvilConverterData var15 = ChunkLoader.load(var14);
                        NBTTagCompound var16 = new NBTTagCompound();
                        NBTTagCompound var17 = new NBTTagCompound();
                        var16.setTag("Level", var17);
                        ChunkLoader.convertToAnvilFormat(var15, var17, par3WorldChunkManager);
                        DataOutputStream var18 = var9.getChunkDataOutputStream(var10, var11);
                        CompressedStreamTools.write(var16, var18);
                        var18.close();
                    }
                }
            }

            var11 = (int)Math.round(100.0D * (double)(par4 * 1024) / (double)(par5 * 1024));
            int var20 = (int)Math.round(100.0D * (double)((var10 + 1) * 32 + par4 * 1024) / (double)(par5 * 1024));

            if (var20 > var11)
            {
                par6IProgressUpdate.setLoadingProgress(var20);
            }
        }

        var8.close();
        var9.close();
    }
    catch (IOException var19)
    {
        var19.printStackTrace();
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:60,代码来源:AnvilSaveConverter.java

示例9: convertChunks

import net.minecraft.util.IProgressUpdate; //导入方法依赖的package包/类
private void convertChunks(File p_75811_1_, File p_75811_2_, WorldChunkManager p_75811_3_, int p_75811_4_, int p_75811_5_, IProgressUpdate p_75811_6_)
{
    try
    {
        String s = p_75811_2_.getName();
        RegionFile regionfile = new RegionFile(p_75811_2_);
        RegionFile regionfile1 = new RegionFile(new File(p_75811_1_, s.substring(0, s.length() - ".mcr".length()) + ".mca"));

        for (int k = 0; k < 32; ++k)
        {
            int l;

            for (l = 0; l < 32; ++l)
            {
                if (regionfile.isChunkSaved(k, l) && !regionfile1.isChunkSaved(k, l))
                {
                    DataInputStream datainputstream = regionfile.getChunkDataInputStream(k, l);

                    if (datainputstream == null)
                    {
                        logger.warn("Failed to fetch input stream");
                    }
                    else
                    {
                        NBTTagCompound nbttagcompound = CompressedStreamTools.read(datainputstream);
                        datainputstream.close();
                        NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag("Level");
                        ChunkLoader.AnvilConverterData anvilconverterdata = ChunkLoader.load(nbttagcompound1);
                        NBTTagCompound nbttagcompound2 = new NBTTagCompound();
                        NBTTagCompound nbttagcompound3 = new NBTTagCompound();
                        nbttagcompound2.setTag("Level", nbttagcompound3);
                        ChunkLoader.convertToAnvilFormat(anvilconverterdata, nbttagcompound3, p_75811_3_);
                        DataOutputStream dataoutputstream = regionfile1.getChunkDataOutputStream(k, l);
                        CompressedStreamTools.write(nbttagcompound2, dataoutputstream);
                        dataoutputstream.close();
                    }
                }
            }

            l = (int)Math.round(100.0D * (double)(p_75811_4_ * 1024) / (double)(p_75811_5_ * 1024));
            int i1 = (int)Math.round(100.0D * (double)((k + 1) * 32 + p_75811_4_ * 1024) / (double)(p_75811_5_ * 1024));

            if (i1 > l)
            {
                p_75811_6_.setLoadingProgress(i1);
            }
        }

        regionfile.close();
        regionfile1.close();
    }
    catch (IOException ioexception)
    {
        ioexception.printStackTrace();
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:57,代码来源:AnvilSaveConverter.java

示例10: convertChunks

import net.minecraft.util.IProgressUpdate; //导入方法依赖的package包/类
/**
 * copies a 32x32 chunk set from par2File to par1File, via AnvilConverterData
 */
private void convertChunks(File par1File, File par2File, WorldChunkManager par3WorldChunkManager, int par4, int par5, IProgressUpdate par6IProgressUpdate)
{
    try
    {
        String s = par2File.getName();
        RegionFile regionfile = new RegionFile(par2File);
        RegionFile regionfile1 = new RegionFile(new File(par1File, s.substring(0, s.length() - ".mcr".length()) + ".mca"));

        for (int k = 0; k < 32; ++k)
        {
            int l;

            for (l = 0; l < 32; ++l)
            {
                if (regionfile.isChunkSaved(k, l) && !regionfile1.isChunkSaved(k, l))
                {
                    DataInputStream datainputstream = regionfile.getChunkDataInputStream(k, l);

                    if (datainputstream == null)
                    {
                        MinecraftServer.getServer().getLogAgent().logWarning("Failed to fetch input stream");
                    }
                    else
                    {
                        NBTTagCompound nbttagcompound = CompressedStreamTools.read(datainputstream);
                        datainputstream.close();
                        NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag("Level");
                        AnvilConverterData anvilconverterdata = ChunkLoader.load(nbttagcompound1);
                        NBTTagCompound nbttagcompound2 = new NBTTagCompound();
                        NBTTagCompound nbttagcompound3 = new NBTTagCompound();
                        nbttagcompound2.setTag("Level", nbttagcompound3);
                        ChunkLoader.convertToAnvilFormat(anvilconverterdata, nbttagcompound3, par3WorldChunkManager);
                        DataOutputStream dataoutputstream = regionfile1.getChunkDataOutputStream(k, l);
                        CompressedStreamTools.write(nbttagcompound2, dataoutputstream);
                        dataoutputstream.close();
                    }
                }
            }

            l = (int)Math.round(100.0D * (double)(par4 * 1024) / (double)(par5 * 1024));
            int i1 = (int)Math.round(100.0D * (double)((k + 1) * 32 + par4 * 1024) / (double)(par5 * 1024));

            if (i1 > l)
            {
                par6IProgressUpdate.setLoadingProgress(i1);
            }
        }

        regionfile.close();
        regionfile1.close();
    }
    catch (IOException ioexception)
    {
        ioexception.printStackTrace();
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:60,代码来源:AnvilSaveConverter.java


注:本文中的net.minecraft.util.IProgressUpdate.setLoadingProgress方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。