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


Java Advancement类代码示例

本文整理汇总了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()));
  }
 
开发者ID:jaredlll08,项目名称:CraftTweaker-Advancements,代码行数:34,代码来源:AdvancementManagerWrapper.java

示例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};
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:11,代码来源:ACAchievements.java

示例3: loadCustomAdvancements

import net.minecraft.advancements.Advancement; //导入依赖的package包/类
@Override
public Map<ResourceLocation, Advancement.Builder> loadCustomAdvancements() {

	return this.parent.loadCustomAdvancements();
}
 
开发者ID:jaredlll08,项目名称:CraftTweaker-Advancements,代码行数:6,代码来源:AdvancementManagerWrapper.java

示例4: loadBuiltInAdvancements

import net.minecraft.advancements.Advancement; //导入依赖的package包/类
@Override
  public void loadBuiltInAdvancements(Map<ResourceLocation, Advancement.Builder> map) {

this.parent.loadBuiltInAdvancements(map);
  }
 
开发者ID:jaredlll08,项目名称:CraftTweaker-Advancements,代码行数:6,代码来源:AdvancementManagerWrapper.java

示例5: getAdvancement

import net.minecraft.advancements.Advancement; //导入依赖的package包/类
@Override
public Advancement getAdvancement(ResourceLocation id) {
		
    return this.parent.getAdvancement(id);
}
 
开发者ID:jaredlll08,项目名称:CraftTweaker-Advancements,代码行数:6,代码来源:AdvancementManagerWrapper.java

示例6: getAdvancements

import net.minecraft.advancements.Advancement; //导入依赖的package包/类
@Override
  public Iterable<Advancement> getAdvancements() {

return this.parent.getAdvancements();
  }
 
开发者ID:jaredlll08,项目名称:CraftTweaker-Advancements,代码行数:6,代码来源:AdvancementManagerWrapper.java

示例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"));
}
 
开发者ID:TeamWizardry,项目名称:Wizardry,代码行数:6,代码来源:ItemDevilDust.java

示例8: getAdvancementOnPickup

import net.minecraft.advancements.Advancement; //导入依赖的package包/类
@Override
public Advancement getAdvancementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item) {
	return ModAdvancements.BOOK;
}
 
开发者ID:TeamWizardry,项目名称:Wizardry,代码行数:5,代码来源:ItemBook.java

示例9: getAdvancementOnPickup

import net.minecraft.advancements.Advancement; //导入依赖的package包/类
Advancement getAdvancementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item); 
开发者ID:TeamWizardry,项目名称:Wizardry,代码行数:2,代码来源:IPickupAchievement.java


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