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


Java SaveFormatComparator.requiresConversion方法代码示例

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


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

示例1: drawSlot

import net.minecraft.world.storage.SaveFormatComparator; //导入方法依赖的package包/类
protected void drawSlot(int entryID, int p_180791_2_, int p_180791_3_, int p_180791_4_, int mouseXIn, int mouseYIn)
{
    SaveFormatComparator saveformatcomparator = (SaveFormatComparator)GuiSelectWorld.this.field_146639_s.get(entryID);
    String s = saveformatcomparator.getDisplayName();

    if (StringUtils.isEmpty(s))
    {
        s = GuiSelectWorld.this.field_146637_u + " " + (entryID + 1);
    }

    String s1 = saveformatcomparator.getFileName();
    s1 = s1 + " (" + GuiSelectWorld.this.field_146633_h.format(new Date(saveformatcomparator.getLastTimePlayed()));
    s1 = s1 + ")";
    String s2 = "";

    if (saveformatcomparator.requiresConversion())
    {
        s2 = GuiSelectWorld.this.field_146636_v + " " + s2;
    }
    else
    {
        s2 = GuiSelectWorld.this.field_146635_w[saveformatcomparator.getEnumGameType().getID()];

        if (saveformatcomparator.isHardcoreModeEnabled())
        {
            s2 = EnumChatFormatting.DARK_RED + I18n.format("gameMode.hardcore", new Object[0]) + EnumChatFormatting.RESET;
        }

        if (saveformatcomparator.getCheatsEnabled())
        {
            s2 = s2 + ", " + I18n.format("selectWorld.cheats", new Object[0]);
        }
    }

    GuiSelectWorld.this.drawString(GuiSelectWorld.this.fontRendererObj, s, p_180791_2_ + 2, p_180791_3_ + 1, 16777215);
    GuiSelectWorld.this.drawString(GuiSelectWorld.this.fontRendererObj, s1, p_180791_2_ + 2, p_180791_3_ + 12, 8421504);
    GuiSelectWorld.this.drawString(GuiSelectWorld.this.fontRendererObj, s2, p_180791_2_ + 2, p_180791_3_ + 12 + 10, 8421504);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:39,代码来源:GuiSelectWorld.java

示例2: drawSlot

import net.minecraft.world.storage.SaveFormatComparator; //导入方法依赖的package包/类
protected void drawSlot(int p_148126_1_, int p_148126_2_, int p_148126_3_, int p_148126_4_, Tessellator p_148126_5_, int p_148126_6_, int p_148126_7_)
{
    SaveFormatComparator var8 = (SaveFormatComparator)GuiSelectWorld.this.field_146639_s.get(p_148126_1_);
    String var9 = var8.getDisplayName();

    if (var9 == null || MathHelper.stringNullOrLengthZero(var9))
    {
        var9 = GuiSelectWorld.this.field_146637_u + " " + (p_148126_1_ + 1);
    }

    String var10 = var8.getFileName();
    var10 = var10 + " (" + GuiSelectWorld.this.field_146633_h.format(new Date(var8.getLastTimePlayed()));
    var10 = var10 + ")";
    String var11 = "";

    if (var8.requiresConversion())
    {
        var11 = GuiSelectWorld.this.field_146636_v + " " + var11;
    }
    else
    {
        var11 = GuiSelectWorld.this.field_146635_w[var8.getEnumGameType().getID()];

        if (var8.isHardcoreModeEnabled())
        {
            var11 = EnumChatFormatting.DARK_RED + I18n.format("gameMode.hardcore", new Object[0]) + EnumChatFormatting.RESET;
        }

        if (var8.getCheatsEnabled())
        {
            var11 = var11 + ", " + I18n.format("selectWorld.cheats", new Object[0]);
        }
    }

    GuiSelectWorld.this.drawString(GuiSelectWorld.this.fontRendererObj, var9, p_148126_2_ + 2, p_148126_3_ + 1, 16777215);
    GuiSelectWorld.this.drawString(GuiSelectWorld.this.fontRendererObj, var10, p_148126_2_ + 2, p_148126_3_ + 12, 8421504);
    GuiSelectWorld.this.drawString(GuiSelectWorld.this.fontRendererObj, var11, p_148126_2_ + 2, p_148126_3_ + 12 + 10, 8421504);
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:39,代码来源:GuiSelectWorld.java

示例3: drawSlot

import net.minecraft.world.storage.SaveFormatComparator; //导入方法依赖的package包/类
protected void drawSlot(int p_148126_1_, int p_148126_2_, int p_148126_3_, int p_148126_4_, Tessellator p_148126_5_, int p_148126_6_, int p_148126_7_)
{
    SaveFormatComparator saveformatcomparator = (SaveFormatComparator)GuiSelectWorld.this.field_146639_s.get(p_148126_1_);
    String s = saveformatcomparator.getDisplayName();

    if (s == null || MathHelper.stringNullOrLengthZero(s))
    {
        s = GuiSelectWorld.this.field_146637_u + " " + (p_148126_1_ + 1);
    }

    String s1 = saveformatcomparator.getFileName();
    s1 = s1 + " (" + GuiSelectWorld.this.field_146633_h.format(new Date(saveformatcomparator.getLastTimePlayed()));
    s1 = s1 + ")";
    String s2 = "";

    if (saveformatcomparator.requiresConversion())
    {
        s2 = GuiSelectWorld.this.field_146636_v + " " + s2;
    }
    else
    {
        s2 = GuiSelectWorld.this.field_146635_w[saveformatcomparator.getEnumGameType().getID()];

        if (saveformatcomparator.isHardcoreModeEnabled())
        {
            s2 = EnumChatFormatting.DARK_RED + I18n.format("gameMode.hardcore", new Object[0]) + EnumChatFormatting.RESET;
        }

        if (saveformatcomparator.getCheatsEnabled())
        {
            s2 = s2 + ", " + I18n.format("selectWorld.cheats", new Object[0]);
        }
    }

    GuiSelectWorld.this.drawString(GuiSelectWorld.this.fontRendererObj, s, p_148126_2_ + 2, p_148126_3_ + 1, 16777215);
    GuiSelectWorld.this.drawString(GuiSelectWorld.this.fontRendererObj, s1, p_148126_2_ + 2, p_148126_3_ + 12, 8421504);
    GuiSelectWorld.this.drawString(GuiSelectWorld.this.fontRendererObj, s2, p_148126_2_ + 2, p_148126_3_ + 12 + 10, 8421504);
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:39,代码来源:GuiSelectWorld.java

示例4: drawSlot

import net.minecraft.world.storage.SaveFormatComparator; //导入方法依赖的package包/类
protected void drawSlot(int par1, int par2, int par3, int par4, Tessellator par5Tessellator)
{
    SaveFormatComparator saveformatcomparator = (SaveFormatComparator)GuiSelectWorld.getSize(this.parentWorldGui).get(par1);
    String s = saveformatcomparator.getDisplayName();

    if (s == null || MathHelper.stringNullOrLengthZero(s))
    {
        s = GuiSelectWorld.func_82313_g(this.parentWorldGui) + " " + (par1 + 1);
    }

    String s1 = saveformatcomparator.getFileName();
    s1 = s1 + " (" + GuiSelectWorld.func_82315_h(this.parentWorldGui).format(new Date(saveformatcomparator.getLastTimePlayed()));
    s1 = s1 + ")";
    String s2 = "";

    if (saveformatcomparator.requiresConversion())
    {
        s2 = GuiSelectWorld.func_82311_i(this.parentWorldGui) + " " + s2;
    }
    else
    {
        s2 = GuiSelectWorld.func_82314_j(this.parentWorldGui)[saveformatcomparator.getEnumGameType().getID()];

        if (saveformatcomparator.isHardcoreModeEnabled())
        {
            s2 = EnumChatFormatting.DARK_RED + I18n.getString("gameMode.hardcore") + EnumChatFormatting.RESET;
        }

        if (saveformatcomparator.getCheatsEnabled())
        {
            s2 = s2 + ", " + I18n.getString("selectWorld.cheats");
        }
    }

    this.parentWorldGui.drawString(this.parentWorldGui.fontRenderer, s, par2 + 2, par3 + 1, 16777215);
    this.parentWorldGui.drawString(this.parentWorldGui.fontRenderer, s1, par2 + 2, par3 + 12, 8421504);
    this.parentWorldGui.drawString(this.parentWorldGui.fontRenderer, s2, par2 + 2, par3 + 12 + 10, 8421504);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:39,代码来源:GuiWorldSlot.java


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