本文整理匯總了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);
}
}
示例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);
}
}
}
示例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);
}
}