當前位置: 首頁>>代碼示例>>Java>>正文


Java AchievementList.ACHIEVEMENTS屬性代碼示例

本文整理匯總了Java中net.minecraft.stats.AchievementList.ACHIEVEMENTS屬性的典型用法代碼示例。如果您正苦於以下問題:Java AchievementList.ACHIEVEMENTS屬性的具體用法?Java AchievementList.ACHIEVEMENTS怎麽用?Java AchievementList.ACHIEVEMENTS使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在net.minecraft.stats.AchievementList的用法示例。


在下文中一共展示了AchievementList.ACHIEVEMENTS屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getTabCompletionOptions

public List<String> getTabCompletionOptions(MinecraftServer server, ICommandSender sender, String[] args, @Nullable BlockPos pos)
{
    if (args.length == 1)
    {
        return getListOfStringsMatchingLastWord(args, new String[] {"give", "take"});
    }
    else if (args.length != 2)
    {
        return args.length == 3 ? getListOfStringsMatchingLastWord(args, server.getAllUsernames()) : Collections.<String>emptyList();
    }
    else
    {
        List<String> list = Lists.<String>newArrayList();

        for (StatBase statbase : AchievementList.ACHIEVEMENTS)
        {
            list.add(statbase.statId);
        }

        return getListOfStringsMatchingLastWord(args, list);
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:22,代碼來源:CommandAchievement.java

示例2: GuiAchievements

public GuiAchievements(GuiScreen parentScreenIn, StatisticsManager statFileWriterIn)
{
    this.parentScreen = parentScreenIn;
    this.statFileWriter = statFileWriterIn;
    int i = 141;
    int j = 141;
    this.xScrollTarget = (double)(AchievementList.OPEN_INVENTORY.displayColumn * 24 - 70 - 12);
    this.xScrollO = this.xScrollTarget;
    this.xScrollP = this.xScrollTarget;
    this.yScrollTarget = (double)(AchievementList.OPEN_INVENTORY.displayRow * 24 - 70);
    this.yScrollO = this.yScrollTarget;
    this.yScrollP = this.yScrollTarget;
    minecraftAchievements.clear();
    for (Achievement achievement : AchievementList.ACHIEVEMENTS)
    {
        if (!net.minecraftforge.common.AchievementPage.isAchievementInPages(achievement))
        {
            minecraftAchievements.add(achievement);
        }
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:21,代碼來源:GuiAchievements.java

示例3: getTabCompletionOptions

public List<String> getTabCompletionOptions(MinecraftServer server, ICommandSender sender, String[] args, @Nullable BlockPos pos)
{
    if (args.length == 1)
    {
        /**
         * Returns a List of strings (chosen from the given strings) which the last word in the given string array
         * is a beginning-match for. (Tab completion).
         */
        return getListOfStringsMatchingLastWord(args, new String[] {"give", "take"});
    }
    else if (args.length != 2)
    {
        return args.length == 3 ? getListOfStringsMatchingLastWord(args, server.getAllUsernames()) : Collections.<String>emptyList();
    }
    else
    {
        List<String> list = Lists.<String>newArrayList();

        for (StatBase statbase : AchievementList.ACHIEVEMENTS)
        {
            list.add(statbase.statId);
        }

        return getListOfStringsMatchingLastWord(args, list);
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:26,代碼來源:CommandAchievement.java


注:本文中的net.minecraft.stats.AchievementList.ACHIEVEMENTS屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。