本文整理匯總了Java中net.minecraftforge.common.AchievementPage類的典型用法代碼示例。如果您正苦於以下問題:Java AchievementPage類的具體用法?Java AchievementPage怎麽用?Java AchievementPage使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
AchievementPage類屬於net.minecraftforge.common包,在下文中一共展示了AchievementPage類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: init
import net.minecraftforge.common.AchievementPage; //導入依賴的package包/類
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
proxy.registerNetworkStuff();
NetworkRegistry.INSTANCE.registerGuiHandler(this, new TechnicalGuiHandler());
TechnicalItem.removeVanillaRecipes();
Recipes.init();
FMLCommonHandler.instance().bus().register(new EventListener());
radioactivityPotion = (new PotionTechnical(radioactivityPotionId, true, 0)).setIconIndex(0, 0).setPotionName("potion.radioactivityPotion");
TechnicalAchievement.init();
AchievementPage.registerAchievementPage(technicalAchievementPage);
}
示例2: init
import net.minecraftforge.common.AchievementPage; //導入依賴的package包/類
public static void init() {
for( AchievementsReader.AchievementList alist : CustomAchievements.proxy.ar.root.achievements ){
if( !alist.uid.isEmpty() ){
int meta = 0;
if( alist.meta != null ){ meta = alist.meta; }
ItemStack is = new ItemStack( Item.getByNameOrId( alist.item ), 1, meta );
if( is != null ) {
Achievement tempAch = new Achievement( "achievement." + alist.uid, alist.uid, alist.xpos, alist.ypos, is, achievements.get( alist.parent ) ).registerStat();
achievements.put( alist.uid, tempAch );
achievementsIgnoreMeta.put( tempAch.hashCode(), alist.ignoreMeta );
achievementsTrophy.put( tempAch.hashCode(), alist.trophy );
if( alist.type.equals( "Detect" ) ){ detectAchievements.add( tempAch ); }
if( alist.type.equals( "Craft" ) ){ craftAchievements.add( tempAch ); }
}
}
}
String tabName = CustomAchievements.proxy.ar.root.tabname.isEmpty() ? "Custom Achievements" : CustomAchievements.proxy.ar.root.tabname;
page = new AchievementPage( tabName, achievements.values().toArray( new Achievement[achievements.size()] ) );
AchievementPage.registerAchievementPage( page );
}
示例3: initialization
import net.minecraftforge.common.AchievementPage; //導入依賴的package包/類
public static void initialization()
{
enter_aether = new AetherAchievement("achievement.enter_aether", "enter_aether", 0, 1, Blocks.GLOWSTONE, (Achievement) null).registerStat();
defeat_bronze = new AetherAchievement("achievement.defeat_bronze", "defeat_bronze", -2, 3, new ItemStack(ItemsAether.dungeon_key, 1, 0), enter_aether).registerStat();
defeat_silver = new AetherAchievement("achievement.defeat_silver", "defeat_silver", 0, 4, new ItemStack(ItemsAether.dungeon_key, 1, 1), enter_aether).registerStat();
defeat_gold = new AetherAchievement("achievement.defeat_gold", "defeat_gold", 2, 3, new ItemStack(ItemsAether.dungeon_key, 1, 2), enter_aether).registerStat();
enchanter = new AetherAchievement("achievement.enchanter", "enchanter", 2, 1, BlocksAether.enchanter, enter_aether).registerStat();
incubator = new AetherAchievement("achievement.incubator", "incubator", 2, -1, BlocksAether.incubator, enter_aether).registerStat();
blue_cloud = new AetherAchievement("achievement.blue_aercloud", "blue_aercloud", -2, -1, new ItemStack(BlocksAether.aercloud, 1, 1), enter_aether).registerStat();
flying_pig = new AetherAchievement("achievement.flying_pig", "flying_pig", -2, 1, Items.SADDLE, enter_aether).registerStat();
grav_tools = new AetherAchievement("achievement.grav_tools", "grav_tools", -1, -3, ItemsAether.gravitite_pickaxe, enter_aether).registerStat();
loreception = new AetherAchievement("achievement.loreception", "loreception", 1, -3, ItemsAether.lore_book, enter_aether).registerStat();
ACpage = new AchievementPage("Aether I", enter_aether, defeat_bronze, defeat_silver, defeat_gold, enchanter, incubator, blue_cloud, flying_pig, grav_tools, loreception);
AchievementPage.registerAchievementPage(ACpage);
}
示例4: handleInteract
import net.minecraftforge.common.AchievementPage; //導入依賴的package包/類
@SuppressWarnings("static-access")
@SubscribeEvent
public static void handleInteract(PlayerInteractEvent.RightClickBlock event) throws NullPointerException
{
ItemStack item = event.getEntityPlayer().getActiveItemStack();
AchievementPage page = ARKCraftAchievements.page;
Achievement achievement = ARKCraftAchievements.achievementMichaelBay;
EntityPlayer player = event.getEntityPlayer();
if (!AchievementHelper.containsAchievement(page, achievement)) {
if (item != null && item.getItem() == ARKCraftRangedWeapons.rocket_propelled_grenade) {
if (item.getDisplayName().equals("Michael_Bay") && player.isSneaking()) {
double x = player.posX;
double y = player.posY;
double z = player.posZ;
Easter.MICHAEL_BAY.createExplosionNoDamage(player, event.getWorld(), 5.0F, x, y, z, 0, 1, 0);
AchievementHelper.registerAndDisplay(player, achievement);
}
}
}
}
示例5: init
import net.minecraftforge.common.AchievementPage; //導入依賴的package包/類
@EventHandler
public void init(FMLInitializationEvent event) {
AlloycraftBlocks.initBlocks();
AlloycraftItems.initItems();
alloycrafttab = new UtilsCreativeTab("alloycraft", Item.getItemFromBlock(AlloycraftBlocks.forgeoff));
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
GameRegistry.addRecipe(new RecipeHandler());
alloyforge = new UtilsAchievement("achievement.alloyforgemade", "alloyforgecrafted", 2, 0, new ItemStack(AlloycraftBlocks.forgeoff), null, "Alloy Forge!", "You made an Alloy Forge!", AlloycraftMain.modid);
alloy = new UtilsAchievement("achievement.alloymade", "alloycrafted", 2, 1, new ItemStack(AlloycraftItems.alloy), alloyforge, "Alloy!", "You made your first Alloy!", AlloycraftMain.modid);
alloyaxe = new UtilsAchievement("achievement.alloyaxemade", "alloyaxecrafted", 0, 2, new ItemStack(AlloycraftItems.alloyaxe), alloy, "Alloy Axe", "Crafted an Alloy Axe", AlloycraftMain.modid);
alloypick = new UtilsAchievement("achievement.alloypickmade", "alloypickcrafted", 1, 2, new ItemStack(AlloycraftItems.alloypickaxe), alloy, "Alloy Pickaxe", "Crafted an Alloy Pickaxe", AlloycraftMain.modid);
alloyhoe = new UtilsAchievement("achievement.alloyhoemade", "alloyhoecrafted", 2, 2, new ItemStack(AlloycraftItems.alloyhoe), alloy, "Alloy Hoe", "Crafted an Alloy Hoe", AlloycraftMain.modid);
alloysword = new UtilsAchievement("achievement.alloyswordmade", "alloyswordcrafted", 3, 2, new ItemStack(AlloycraftItems.alloysword), alloy, "Alloy Sword", "Crafted an Alloy Sword", AlloycraftMain.modid);
alloyshovel = new UtilsAchievement("achievement.alloyshovelmade", "alloyshovelcrafted", 4, 2, new ItemStack(AlloycraftItems.alloyshovel), alloy, "Alloy Shovel", "Crafted an Alloy Shovel", AlloycraftMain.modid);
alloyCraftPage = new AchievementPage("Alloycraft" ,new Achievement[]{alloyforge, alloy, alloypick, alloyhoe, alloyaxe, alloyshovel, alloysword});
AchievementPage.registerAchievementPage(alloyCraftPage);
MinecraftForge.EVENT_BUS.register(new com.ashindigo.alloycraft.lib.EventHandler());
}
示例6: init
import net.minecraftforge.common.AchievementPage; //導入依賴的package包/類
public static void init() {
// localized name, nonLocalizedName, x,y (in achievement page), item or block to display on page, see AchivementList.java for rest
firstGoldCoin = new Achievement("achievement.firstGoldCoin", "firstGoldCoin", 0, 0,
new ItemStack(ModItems.goldCoin), (Achievement)null).initIndependentStat();
levelTenDragon = new Achievement("achievement.levelTenDragon", "levelTenDragon", 1, 2,
new ItemStack(ModItems.goldCoin), firstGoldCoin);
foundAllDragonEggs = new Achievement("achievement.foundAllDragonEggs", "foundAllDragonEggs", 1, 4,
new ItemStack(ModItems.earthDragonEgg), levelTenDragon);
firstGoldCoin.registerStat();
levelTenDragon.registerStat();
foundAllDragonEggs.registerStat();
AchievementPage.registerAchievementPage(new AchievementPage("Draco Animus",
// new Achievement[] { firstGoldCoin, levelTenDragon }
new Achievement[] { firstGoldCoin, levelTenDragon, foundAllDragonEggs }
));
}
示例7: loadAchievements
import net.minecraftforge.common.AchievementPage; //導入依賴的package包/類
public static void loadAchievements()
{
getBitumen = new Achievement("achievement.roadstuff_getbitumen", "roadstuff_getbitumen", 0, 0, new ItemStack(RoadStuffItems.itemBitumen, 1, 0), null);
smeltBitumen = new Achievement("achievement.roadstuff_smeltbitumen", "roadstuff_smeltbitumen", 2, 0, new ItemStack(RoadStuffItems.itemBitumen, 1, 1), getBitumen);
craftAsphalt = new Achievement("achievement.roadstuff_craftasphalt", "roadstuff_craftasphalt", 4, 0, new ItemStack(RoadStuffBlocks.blockAsphalt, 1, 0), smeltBitumen);
craftAsphaltLine = new Achievement("achievement.roadstuff_craftasphaltline", "roadstuff_craftasphaltline", 6, 0, new ItemStack(RoadStuffBlocks.blockAsphaltLine, 1, 0), craftAsphalt);
craftAsphaltCorner = new Achievement("achievement.roadstuff_craftasphaltcorner", "roadstuff_craftasphaltcorner", 8, 0, new ItemStack(RoadStuffBlocks.blockAsphaltCorner, 1, 0), craftAsphaltLine);
craftAsphaltSlab = new Achievement("achievement.roadstuff_craftasphaltslab", "roadstuff_craftasphaltslab", 5, -1, new ItemStack(RoadStuffBlocks.singleSlabAsphalt, 1, 0), craftAsphalt);
craftConcrete = new Achievement("achievement.roadstuff_craftconcrete", "roadstuff_craftconcrete", 4, 2, new ItemStack(RoadStuffBlocks.blockConcrete, 1, 0), null);
craftConcreteLine = new Achievement("achievement.roadstuff_craftconcreteline", "roadstuff_craftconcreteline", 6, 2, new ItemStack(RoadStuffBlocks.blockConcreteLine, 1, 0), craftConcrete);
craftConcreteCorner = new Achievement("achievement.roadstuff_craftconcretecorner", "roadstuff_craftconcretecorner", 8, 2, new ItemStack(RoadStuffBlocks.blockConcreteCorner, 1, 0), craftConcreteLine);
craftConcreteSlab = new Achievement("achievement.roadstuff_craftconcreteslab", "roadstuff_craftconcreteslab", 5, 3, new ItemStack(RoadStuffBlocks.singleSlabConcrete, 1, 0), craftConcrete);
craftCone = new Achievement("achievement.roadstuff_craftcone", "roadstuff_craftcone", 2, -4, new ItemStack(RoadStuffBlocks.blockCone, 1, 0), smeltBitumen);
craftSign = new Achievement("achievement.roadstuff_craftsign", "roadstuff_craftsign", 4, -4, new ItemStack(RoadStuffBlocks.blockTrafficSign, 1, 1), craftCone);
configSign = new Achievement("achievement.roadstuff_configsign", "roadstuff_configsign", 6, -4, new ItemStack(RoadStuffBlocks.blockTrafficSign, 1, 1), craftSign);
craftReflector = new Achievement("achievement.roadstuff_craftreflector", "roadstuff_craftreflector", 0, -4, new ItemStack(RoadStuffBlocks.blockReflector, 1, 0), craftCone);
craftIlluminatedReflector = new Achievement("achievement.roadstuff_craftilluminatedreflector", "roadstuff_craftilluminatedreflector", 0, -6, new ItemStack(RoadStuffBlocks.blockReflector, 1, 3), craftReflector);
page = new AchievementPage("Road Stuff", getBitumen, smeltBitumen, craftAsphalt, craftConcrete, craftCone, craftAsphaltLine, craftAsphaltCorner, craftConcreteLine, craftConcreteCorner, craftSign, configSign, craftReflector, craftIlluminatedReflector, craftAsphaltSlab, craftConcreteSlab);
}
示例8: createPage
import net.minecraftforge.common.AchievementPage; //導入依賴的package包/類
public static void createPage(File file, AchievementFile achievementFile) {
String langZip = achievementFile.getLangZip();
if (langZip != null && !langZip.isEmpty()) {
File langFile = new File(file.getParentFile(), langZip + (langZip.endsWith(".zip") ? "" : ".zip"));
if (langFile.exists()) {
Logger.logInfo("Attempting to inject language zip " + langZip);
injectLanguage(langFile, FMLCommonHandler.instance().getEffectiveSide());
} else
Logger.logWarning("Could not find language zip!");
} else
Logger.logError("No default lang zip found.");
String pageId = achievementFile.getPageTitle().replace(" ", "-");
List<Achievement> achievements = new ArrayList<Achievement>();
for (AchievementInfo info : achievementFile.getAchievementInfo()) {
Achievement achieve = createAchievement(achievements, info, pageId);
if (achieve != null)
achievements.add(achieve);
}
Achievement[] array = new Achievement[achievements.size()];
for (int i = 0; i < array.length; i++)
array[i] = achievements.get(i);
Logger.logInfo("Created page for " + achievementFile.getPageTitle());
AchievementPage.registerAchievementPage(new AchievementPage(achievementFile.getPageTitle(), array));
}
示例9: register
import net.minecraftforge.common.AchievementPage; //導入依賴的package包/類
public static void register() {
AchievementPage.registerAchievementPage(new AchievementPage("Advanced Rocketry", moonLanding,
dilithiumCrystals,
beerOnTheSun,
weReallyWentToTheMoon,
suitedUp,
givingItAllShesGot,
crystalline,
rollin,
warp,
oneSmallStep,
holographic,
flightOfThePhoenix,
spinDoctor,
feelTheHeat,
electrifying,
blockPresser));
}
示例10: init
import net.minecraftforge.common.AchievementPage; //導入依賴的package包/類
public static void init() {
firstBag = new Achievement("achievement.firstbag", "firstbag", 0, 0, ModItems.foid, null);
firstBag.registerStat();
voidBag = new Achievement("achievement.voidbag", "voidbag", 2, -1, ModItems.foid, firstBag);
voidBag.registerStat();
enderBag = new Achievement("achievement.enderbag", "enderbag", -2, -1, ModItems.ender, firstBag);
enderBag.registerStat();
tier2Bag = new Achievement("achievement.tier2bag", "tier2bag", 0, -2, ModItems.foid, firstBag);
tier2Bag.registerStat();
tier3Bag = new Achievement("achievement.tier3bag", "tier3bag", 0, -4, ModItems.foid, tier2Bag);
AchievementPage.registerAchievementPage(
new AchievementPage("Bagginses",
firstBag,
voidBag,
enderBag,
tier2Bag,
tier3Bag));
}
示例11: init
import net.minecraftforge.common.AchievementPage; //導入依賴的package包/類
public static void init() {
achievements = new Achievement[achievementInfo.length];
Achievement achievement;
Achievement parent;
String achievementKey;
AchievementInfo info;
for (int i = 0; i < achievementInfo.length; i++) {
info = achievementInfo[i];
achievementKey = "achievement_" + i;
parent = info.parent > -1 ? achievements[info.parent] : null;
achievement = new Achievement(achievementKey, achievementKey, info.xPos, info.yPos, info.icon, parent).registerStat();
if (info.isSpecial) {
achievement = achievement.setSpecial();
}
achievements[i] = achievement;
}
page = new AchievementPage("Cybernetica", achievements);
AchievementPage.registerAchievementPage(page);
//Register achievement completion event listener
FMLCommonHandler.instance().bus().register(new AchievementListener());
}
示例12: init
import net.minecraftforge.common.AchievementPage; //導入依賴的package包/類
public void init(FMLInitializationEvent event) {
EntityRegistry.registerModEntity(EntityStone.class, "stonethrown", 3, VintageCraft.instance, 64, 1, true);
EntityRegistry.registerModEntity(EntityMobHorse.class, "mobhorse", 4, VintageCraft.instance, 64, 1, true);
EntityRegistry.registerModEntity(EntityForestSpider.class, "VCForestSpider", 5, VintageCraft.instance, 64, 1, true);
EntityRegistry.registerModEntity(EntityCoalPoweredMinecartVC.class, "VCCoalPoweredMinecart", 6, VintageCraft.instance, 80, 1, true);
EntityRegistry.registerModEntity(EntityEmptyMinecartVC.class, "VCMinecart", 7, VintageCraft.instance, 80, 1, true);
EntityRegistry.registerModEntity(EntityCowVC.class, "CowVC", 8, VintageCraft.instance, 80, 1, true);
EntityRegistry.registerModEntity(EntitySheepVC.class, "SheepVC", 9, VintageCraft.instance, 80, 1, true);
for (Achievement ach : AchievementsVC.achievements) {
ach.registerStat();
}
AchievementPage.registerAchievementPage(new AchievementPage(
"Vintagecraft",
AchievementsVC.achievements.toArray(new Achievement[0])
));
}
示例13: load
import net.minecraftforge.common.AchievementPage; //導入依賴的package包/類
public static void load() {
nileStart = new Achievement("achievement.nileStart", "nileStart", 0, 0, ModItems.nileGrain, (Achievement) null).setIndependent().registerAchievement();
travelToNillax = new Achievement("achievement.travelToNillax", "travelToNillax", 2, 1, ModBlocks.nillaxStone, nileStart).registerAchievement();
buildNWorkBench = new Achievement("achievement.buildNWorkBench", "buildNWorkBench", 4, -1, ModBlocks.nileWorktable, travelToNillax).registerAchievement();
buildNileSword = new Achievement("achievement.buildNileSword", "buildNileSword", 6, -1, ModItems.nileSword, buildNWorkBench).registerAchievement();
zertumKill = new Achievement("achievement.zertumKill", "zertumKill", 8, -2, Items.bone, buildNileSword).registerAchievement();
skinningRiggator = new Achievement("achievement.skinningRiggator", "skinningRiggator", 8, 0, ModItems.riggatorMeatRaw, buildNileSword).registerAchievement();
buildNileBone = new Achievement("achievement.buildNileBone", "buildNileBone", 2, -3, ModItems.nileBone, buildNWorkBench).registerAchievement();
zertumTame = new Achievement("achievement.zertumTame", "zertumTame", 0, -5, ModItems.dogTreat, buildNileBone).registerAchievement();
mountUp = new Achievement("achievement.mountUp", "mountUp", -1, -3, Items.saddle, buildNileBone).registerAchievement();
alphaLevelUp = new Achievement("achievement.alphaLevelUp", "alphaLevelUp", -3, -5, ModItems.alphaBit, zertumTame).registerAchievement();
deltaLevelUp = new Achievement("achievement.deltaLevelUp", "deltaLevelUp", -6, -5, ModItems.deltaBit, alphaLevelUp).registerAchievement().setSpecial();
ZeroQuestPage.registerAchievementPage(new AchievementPage("Zero Quest", new Achievement[] {
nileStart, zertumKill, skinningRiggator, buildNileBone, buildNileSword,
buildNWorkBench, zertumTame, mountUp, travelToNillax, alphaLevelUp, deltaLevelUp }));
}
示例14: GuiAchievements
import net.minecraftforge.common.AchievementPage; //導入依賴的package包/類
public GuiAchievements(GuiScreen p_i45026_1_, StatFileWriter p_i45026_2_)
{
this.field_146562_a = p_i45026_1_;
this.field_146556_E = p_i45026_2_;
short short1 = 141;
short short2 = 141;
this.field_146569_s = this.field_146567_u = this.field_146565_w = (double)(AchievementList.openInventory.displayColumn * 24 - short1 / 2 - 12);
this.field_146568_t = this.field_146566_v = this.field_146573_x = (double)(AchievementList.openInventory.displayRow * 24 - short2 / 2);
minecraftAchievements.clear();
for (Object achievement : AchievementList.achievementList)
{
if (!AchievementPage.isAchievementInPages((Achievement)achievement))
{
minecraftAchievements.add((Achievement)achievement);
}
}
}
示例15: actionPerformed
import net.minecraftforge.common.AchievementPage; //導入依賴的package包/類
protected void actionPerformed(GuiButton p_146284_1_)
{
if (!this.field_146558_F)
{
if (p_146284_1_.id == 1)
{
this.mc.displayGuiScreen(this.field_146562_a);
}
if (p_146284_1_.id == 2)
{
currentPage++;
if (currentPage >= AchievementPage.getAchievementPages().size())
{
currentPage = -1;
}
button.displayString = AchievementPage.getTitle(currentPage);
}
}
}