本文整理汇总了Java中net.minecraft.advancements.Advancement类的典型用法代码示例。如果您正苦于以下问题:Java Advancement类的具体用法?Java Advancement怎么用?Java Advancement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Advancement类属于net.minecraft.advancements包,在下文中一共展示了Advancement类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: reload
import net.minecraft.advancements.Advancement; //导入依赖的package包/类
@Override
public void reload() {
if (this.parent != null) {
this.parent.reload();
}
CRTADV.log.info("Hooking into advancements. {} existing advancements found.", Iterables.size(AdvancementManager.ADVANCEMENT_LIST.getAdvancements()));
Map<ResourceLocation, Advancement.Builder> map = new HashMap<>();
TextComponentString hello = new TextComponentString("hello");
ItemStack icon = new ItemStack(Items.APPLE);
DisplayInfo inf = new DisplayInfo(icon, hello, hello, null, FrameType.GOAL, true, true, false);
AdvancementRewards rewardsIn = new AdvancementRewards(5, new ResourceLocation[0], new ResourceLocation[0], FunctionObject.CacheableFunction.EMPTY);
Map<String, Criterion> crit = new HashMap<>();
crit.put("test", new Criterion(new PlacedBlockTrigger.Instance(Blocks.DIAMOND_BLOCK, null, LocationPredicate.ANY, ItemPredicate.ANY)));
Advancement advancement = new Advancement(new ResourceLocation("test"), AdvancementManager.ADVANCEMENT_LIST.getAdvancement(new ResourceLocation("minecraft:story/upgrade_tools")), inf, rewardsIn, crit, new String[0][0]);
map.put(new ResourceLocation("test"), advancement.copy());
System.out.println(AdvancementManager.ADVANCEMENT_LIST.getAdvancements());
AdvancementManager.ADVANCEMENT_LIST.loadAdvancements(map);
System.out.println(AdvancementManager.ADVANCEMENT_LIST.getAdvancements());
for (Advancement advancement1 : ADVANCEMENT_LIST.getRoots())
{
if (advancement1.getDisplay() != null)
{
AdvancementTreeNode.layout(advancement1);
}
}
CRTADV.log.info("{} advancements found.", Iterables.size(AdvancementManager.ADVANCEMENT_LIST.getAdvancements()));
}
示例2: getAchievements
import net.minecraft.advancements.Advancement; //导入依赖的package包/类
public static Advancement[] getAchievements(){
return new Advancement[] {necronomicon, mine_abyssalnite, kill_depths_ghoul, enter_abyssal_wasteland,
kill_spectral_dragon, summon_asorah, kill_asorah, enter_dreadlands, kill_dreadguard, depths_ghoul_head, pete_head,
mr_wilson_head, dr_orange_head, mine_coralium, mine_abyssal_coralium, find_powerstone, gateway_key,
dreaded_gateway_key, rlyehian_gateway_key, summon_chagaroth, kill_chagaroth,enter_omothol, enter_dark_realm,
abyssal_wasteland_necronomicon, dreadlands_necronomicon, omothol_necronomicon, abyssalnomicon, ritual_altar,
summoning_ritual, creation_ritual, kill_omothol_elite, locate_jzahar, kill_jzahar, shadow_gems, mine_abyssal_ores,
mine_dreadlands_ores, dreadium, ethaxium, make_transmutator, make_crystallizer, make_materializer, make_crystal_bag,
make_engraver, breeding_ritual, potion_ritual, aoe_potion_ritual, infusion_ritual};
}
示例3: loadCustomAdvancements
import net.minecraft.advancements.Advancement; //导入依赖的package包/类
@Override
public Map<ResourceLocation, Advancement.Builder> loadCustomAdvancements() {
return this.parent.loadCustomAdvancements();
}
示例4: loadBuiltInAdvancements
import net.minecraft.advancements.Advancement; //导入依赖的package包/类
@Override
public void loadBuiltInAdvancements(Map<ResourceLocation, Advancement.Builder> map) {
this.parent.loadBuiltInAdvancements(map);
}
示例5: getAdvancement
import net.minecraft.advancements.Advancement; //导入依赖的package包/类
@Override
public Advancement getAdvancement(ResourceLocation id) {
return this.parent.getAdvancement(id);
}
示例6: getAdvancements
import net.minecraft.advancements.Advancement; //导入依赖的package包/类
@Override
public Iterable<Advancement> getAdvancements() {
return this.parent.getAdvancements();
}
示例7: getAdvancementOnPickup
import net.minecraft.advancements.Advancement; //导入依赖的package包/类
@Override
public Advancement getAdvancementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item) {
MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
return server.getAdvancementManager().getAdvancement(new ResourceLocation(Wizardry.MODID, "advancements/advancement_devildust.json"));
}
示例8: getAdvancementOnPickup
import net.minecraft.advancements.Advancement; //导入依赖的package包/类
@Override
public Advancement getAdvancementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item) {
return ModAdvancements.BOOK;
}
示例9: getAdvancementOnPickup
import net.minecraft.advancements.Advancement; //导入依赖的package包/类
Advancement getAdvancementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item);