本文整理汇总了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);
}
}