예제 #1
0
  @RegInitCallback
  public static void init() {
    DispatcherAch.init();

    AchievementPage.registerAchievementPage(pageDefault = new PageDefault());

    AchievementPage.registerAchievementPage(pageCtElectromaster = new PageCtElectromaster());
    AchievementPage.registerAchievementPage(pageCtMeltdowner = new PageCtMeltdowner());
    AchievementPage.registerAchievementPage(pageCtTeleporter = new PageCtTeleporter());
  }
예제 #2
0
 public static void initAchievements() {
   AchieveLib.registerAchievement(
       "117027",
       "rpMakeAlloy",
       0,
       0,
       new ItemStack(blockAppliance, 1, 0),
       AchievementList.buildFurnace);
   AchieveLib.registerAchievement(
       "117028", "rpMakeSaw", 4, 0, new ItemStack(itemHandsawDiamond), AchievementList.diamonds);
   AchieveLib.registerAchievement("117029", "rpIngotRed", 2, 2, itemIngotRed, "rpMakeAlloy");
   AchieveLib.registerAchievement("117030", "rpIngotBlue", 2, 4, itemIngotBlue, "rpMakeAlloy");
   AchieveLib.registerAchievement("117031", "rpIngotBrass", 2, 6, itemIngotBrass, "rpMakeAlloy");
   AchieveLib.registerAchievement(
       "117032",
       "rpAdvBench",
       -2,
       0,
       new ItemStack(blockAppliance, 1, 3),
       AchievementList.buildWorkBench);
   AchieveLib.addCraftingAchievement(new ItemStack(blockAppliance, 1, 0), "rpMakeAlloy");
   AchieveLib.addCraftingAchievement(new ItemStack(blockAppliance, 1, 3), "rpAdvBench");
   AchieveLib.addCraftingAchievement(new ItemStack(itemHandsawDiamond), "rpMakeSaw");
   AchieveLib.addAlloyAchievement(itemIngotRed, "rpIngotRed");
   AchieveLib.addAlloyAchievement(itemIngotBlue, "rpIngotBlue");
   AchieveLib.addAlloyAchievement(itemIngotBrass, "rpIngotBrass");
   AchievementPage.registerAchievementPage(AchieveLib.achievepage);
 }
예제 #3
0
  /**
   * Fired when a control is clicked. This is the equivalent of
   * ActionListener.actionPerformed(ActionEvent e).
   */
  protected void actionPerformed(GuiButton par1GuiButton) {
    if (par1GuiButton.id == 1) {
      this.mc.displayGuiScreen((GuiScreen) null);
      this.mc.setIngameFocus();
    }

    if (par1GuiButton.id == 2) {
      currentPage++;

      if (currentPage >= AchievementPage.getAchievementPages().size()) {
        currentPage = -1;
      }

      button.displayString = AchievementPage.getTitle(currentPage);
    }

    super.actionPerformed(par1GuiButton);
  }
  @EventHandler // used in 1.6.2
  // @Init       // used in 1.5.2
  public void load(FMLInitializationEvent event) {
    //      proxy.registerRenderers();
    MinecraftForge.EVENT_BUS.register(new VampireEventHandler());

    LanguageRegistry.addName(BloodtapEmpty, "Empty Bloodtap");
    LanguageRegistry.addName(Bloodtap, "Filled Bloodtap");
    LanguageRegistry.addName(BottledBlood, "Bottle of Blood");

    // Recipes
    GameRegistry.addRecipe(
        new ItemStack(BloodtapEmpty),
        "xxx",
        "zyx",
        'x',
        new ItemStack(Item.stick),
        'y',
        new ItemStack(Item.glassBottle),
        'z',
        new ItemStack(Item.ingotIron));

    GameRegistry.addRecipe(
        new ItemStack(RunicBrick),
        "rdr",
        "dod",
        "rdr",
        'r',
        new ItemStack(Item.redstone),
        'd',
        new ItemStack(Item.diamond),
        'o',
        new ItemStack(Block.obsidian));

    LanguageRegistry.addName(RuneCraftingTable, "Runecrafting Table");
    MinecraftForge.setBlockHarvestLevel(RuneCraftingTable, "pickaxe", 2);
    GameRegistry.registerBlock(RuneCraftingTable, "RuneCraftingTable");

    LanguageRegistry.addName(RunicBrick, "Runic Brick");
    MinecraftForge.setBlockHarvestLevel(RunicBrick, "pickaxe", 5);
    GameRegistry.registerBlock(RunicBrick, "RunicBrick");

    LanguageRegistry.instance()
        .addStringLocalization("achievement.vampirism", "en_US", "Became a vampire!");
    LanguageRegistry.instance()
        .addStringLocalization("achievement.vampirism.desc", "en_US", "You (sort of) died!");

    LanguageRegistry.instance()
        .addStringLocalization("achievement.immortality", "en_US", "Became an original");
    LanguageRegistry.instance()
        .addStringLocalization(
            "achievement.immortality.desc", "en_US", "Hope you made the right call.");

    AchievementPage.registerAchievementPage(page1);
  }
예제 #5
0
 /** Adds the buttons (and other controls) to the screen in question. */
 public void initGui() {
   this.controlList.clear();
   this.controlList.add(
       new GuiSmallButton(
           1,
           this.width / 2 + 24,
           this.height / 2 + 74,
           80,
           20,
           StatCollector.translateToLocal("gui.done")));
   this.controlList.add(
       button =
           new GuiSmallButton(
               2,
               (width - achievementsPaneWidth) / 2 + 24,
               height / 2 + 74,
               125,
               20,
               AchievementPage.getTitle(currentPage)));
 }
예제 #6
0
  public GuiAchievements(StatFileWriter par1StatFileWriter) {
    this.statFileWriter = par1StatFileWriter;
    short var2 = 141;
    short var3 = 141;
    this.field_74117_m =
        this.guiMapX =
            this.field_74124_q =
                (double) (AchievementList.openInventory.displayColumn * 24 - var2 / 2 - 12);
    this.field_74115_n =
        this.guiMapY =
            this.field_74123_r =
                (double) (AchievementList.openInventory.displayRow * 24 - var3 / 2);
    minecraftAchievements.clear();

    for (Object achievement : AchievementList.achievementList) {
      if (!AchievementPage.isAchievementInPages((Achievement) achievement)) {
        minecraftAchievements.add((Achievement) achievement);
      }
    }
  }
  public static void init() {
    openManual =
        new AchievementIE("openManual", 0, 0, new ItemStack(IEContent.itemTool, 1, 3), null);
    craftHammer = new AchievementIE("craftHammer", 3, 1, IEContent.itemTool, openManual);
    connectWire = new AchievementIE("connectWire", 0, -2, IEContent.itemWireCoil, openManual);
    blastfurnace =
        new AchievementIE(
            "blastfurnace", 2, 0, new ItemStack(IEContent.blockStoneDevice, 1, 2), craftHammer);
    makeSteel =
        new AchievementIE(
            "makeSteel", 2, -2, new ItemStack(IEContent.itemMetal, 1, 7), blastfurnace);

    //		openManual = new AchievementIE("", 0, 0, new ItemStack(IEContent.itemTool,1,3), null);
    //		openManual = new AchievementIE("", 0, 0, new ItemStack(IEContent.itemTool,1,3), null);
    //		openManual = new AchievementIE("", 0, 0, new ItemStack(IEContent.itemTool,1,3), null);
    mbSilo =
        new AchievementIE(
                "mbSilo",
                6,
                -3,
                new ItemStack(IEContent.blockMetalMultiblocks, 1, BlockMetalMultiblocks.META_silo),
                craftHammer)
            .setSpecial();
    mbCrusher =
        new AchievementIE(
                "mbCrusher",
                6,
                -2,
                new ItemStack(
                    IEContent.blockMetalMultiblocks, 1, BlockMetalMultiblocks.META_crusher),
                craftHammer)
            .setSpecial();
    mbDieselGen =
        new AchievementIE(
                "mbDieselGen",
                6,
                -1,
                new ItemStack(
                    IEContent.blockMetalMultiblocks, 1, BlockMetalMultiblocks.META_dieselGenerator),
                craftHammer)
            .setSpecial();
    mbExcavator =
        new AchievementIE(
                "mbExcavator",
                6,
                0,
                new ItemStack(
                    IEContent.blockMetalMultiblocks, 1, BlockMetalMultiblocks.META_excavator),
                craftHammer)
            .setSpecial();
    mbArcFurnace =
        new AchievementIE(
                "mbArcFurnace",
                6,
                1,
                new ItemStack(
                    IEContent.blockMetalMultiblocks, 1, BlockMetalMultiblocks.META_arcFurnace),
                craftHammer)
            .setSpecial();

    makeRevolver = new AchievementIE("makeRevolver", 3, -5, IEContent.itemRevolver, makeSteel);
    ItemStack[] upgrades = new ItemStack[20];
    upgrades[18] = new ItemStack(IEContent.itemToolUpgrades, 1, 5);
    upgrades[19] = new ItemStack(IEContent.itemToolUpgrades, 1, 6);
    ItemStack revolver = new ItemStack(IEContent.itemRevolver);
    ((ItemRevolver) IEContent.itemRevolver).setContainedItems(revolver, upgrades);
    ((ItemRevolver) IEContent.itemRevolver).recalculateUpgrades(revolver);
    upgradeRevolver = new AchievementIE("upgradeRevolver", 4, -5, revolver, makeRevolver);
    if (Loader.isModLoaded("Botania"))
      makeWolfPack =
          new AchievementIE(
                  "makeWolfPack", 4, -6, new ItemStack(IEContent.itemBullet, 1, 8), makeRevolver)
              .setSpecial();

    ItemStack drill = new ItemStack(IEContent.itemDrill);
    ((ItemDrill) IEContent.itemDrill).setHead(drill, new ItemStack(IEContent.itemDrillhead));
    makeDrill = new AchievementIE("makeDrill", 1, -5, drill, makeSteel);
    upgrades = new ItemStack[4];
    upgrades[0] = new ItemStack(IEContent.itemDrillhead);
    upgrades[1] = new ItemStack(IEContent.itemToolUpgrades, 1, 0);
    upgrades[2] = new ItemStack(IEContent.itemToolUpgrades, 1, 1);
    upgrades[3] = new ItemStack(IEContent.itemToolUpgrades, 3, 2);
    ItemStack drill2 = drill.copy();
    ((ItemDrill) IEContent.itemDrill).setContainedItems(drill2, upgrades);
    ((ItemDrill) IEContent.itemDrill).recalculateUpgrades(drill2);
    upgradeDrill = new AchievementIE("upgradeDrill", 0, -5, drill2, makeDrill);

    makeSkyhook = new AchievementIE("makeSkyhook", 1, -4, IEContent.itemSkyhook, makeSteel);
    ItemStack hook = new ItemStack(IEContent.itemSkyhook);
    hook.addEnchantment(Enchantment.unbreaking, 1);
    skyhookPro = new AchievementIE("skyhookPro", 0, -4, hook, makeSkyhook);

    ieAchievementPage =
        new AchievementPage(
            ImmersiveEngineering.MODNAME,
            AchievementIE.achievements.toArray(new Achievement[AchievementIE.achievements.size()]));
    AchievementPage.registerAchievementPage(ieAchievementPage);

    statDistanceSkyhook =
        new StatBase(
            "stat.skyhookOneCm",
            new ChatComponentTranslation("stat.skyhookOneCm", new Object[0]),
            StatBase.distanceStatType) {
          @Override
          public StatBase registerStat() {
            super.registerStat();
            StatList.generalStats.add(12, this);
            return this;
          }
        }.initIndependentStat().registerStat();
  }
예제 #8
0
 public static void load() {
   AchievementPage page =
       new AchievementPage(
           TragicMC.MODID,
           thanks,
           kill,
           mercury,
           obsidianOrb,
           dimensionalKey,
           collision,
           aeris,
           synapseLink,
           synapse,
           overlord,
           overlord2,
           overlord3,
           overlord4,
           weapon,
           kill,
           killBoss,
           killAlpha,
           enchant,
           reach,
           enchantArmor,
           fullSuit,
           haxEngage,
           tungsten,
           amulet,
           amuletEquip,
           amuletRelease,
           amuletMax,
           amuletSpecial,
           jack,
           luminescence,
           combustion,
           veteran,
           doom,
           doomsday,
           doomsdayCombo,
           doomCooldown,
           doomConsume,
           doomCritical,
           talisman,
           talismanSpecial,
           talismanFull,
           goldenSushi,
           flight,
           disorientation,
           mobStatue,
           challengeScroll,
           doomsdayScroll,
           mineXP,
           loot,
           loot2,
           systemCrash,
           divinity,
           tragicNeko,
           pumpkinhead,
           norVox,
           psygote,
           sirv,
           ragr,
           kurayami,
           cantTouchThis,
           rewind,
           aegar,
           claymation2in1,
           skultarImmune,
           minotaurLightning,
           seeker,
           harvester,
           lockdown,
           fusea,
           ire,
           apis,
           skultar,
           kitsunakuma,
           polaris,
           empariah,
           timeController,
           enyvil,
           claymation);
   AchievementPage.registerAchievementPage(page);
 }
예제 #9
0
  @PreInit
  public void postInit(FMLPreInitializationEvent event) {

    // Registers(Kayitlar)
    MinecraftForge.EVENT_BUS.register(new SoundHandler());

    RenderingRegistry.registerEntityRenderingHandler(
        ghost.class, new render(new ghostmodel(), 0.3F));
    RenderingRegistry.registerEntityRenderingHandler(
        Badghost.class, new Badghostrender(new ghostmodel(), 0.3F));
    ClientRegistry.bindTileEntitySpecialRenderer(
        TileEntityCopperWire.class, new RenderCopperWire());
    ClientRegistry.bindTileEntitySpecialRenderer(
        TileEntitySolarGenerator.class, new RenderSolarPanel());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBatteryBox.class, new RenderBattery());
    ClientRegistry.bindTileEntitySpecialRenderer(
        TileEntityCoalGenerator.class, new RenderGenerator());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEF.class, new RenderEFurnace());

    if (MECLiquid.blockID + 1 != MECLiquidStill.blockID) {
      throw new RuntimeException("Liquid Still id must be Liquid Moving id + 1");
    }
    dirtBucket = (MECBucketHandler) new MECBucketHandler();
    MinecraftForge.EVENT_BUS.register(new MECBucketHandler());
    ModLoader.registerEntityID(Badghost.class, "Banion", 8, x, y);
    ModLoader.registerEntityID(ghost.class, "Mip", 7, x, y);
    ModLoader.getUniqueEntityId();
    ModLoader.addSpawn(ghost.class, 10, 4, 7, EnumCreatureType.ambient, MarbleBiome);
    ModLoader.addSpawn(Badghost.class, 14, 4, 7, EnumCreatureType.ambient, MarbleBiome);

    LanguageRegistry.instance().addStringLocalization("entity.Mip.name", "en_US", "Mip");
    LanguageRegistry.instance().addStringLocalization("entity.Banion.name", "en_US", "Banion");
    IronPlate =
        new IronPlate(ItemID + 5)
            .setMaxStackSize(64)
            .setCreativeTab(MEC)
            .setUnlocalizedName("plateIron");
    GoldPlate =
        new IronPlate(ItemID + 6)
            .setMaxStackSize(64)
            .setCreativeTab(MEC)
            .setUnlocalizedName("plateGold");
    CopperPlate =
        new IronPlate(ItemID + 7)
            .setMaxStackSize(64)
            .setCreativeTab(MEC)
            .setUnlocalizedName("plateCopper");
    SteelPlate =
        new IronPlate(ItemID + 8)
            .setMaxStackSize(64)
            .setCreativeTab(MEC)
            .setUnlocalizedName("plateSteel");
    CopperIngot =
        new ItemMEC(ItemID + 9)
            .setMaxStackSize(64)
            .setCreativeTab(MEC)
            .setUnlocalizedName("ingotCopper");
    SteelIngot =
        new ItemMEC(ItemID + 10)
            .setMaxStackSize(64)
            .setCreativeTab(MEC)
            .setUnlocalizedName("ingotSteel");
    Heart =
        new Heart(ItemID, 10, 12, true)
            .setMaxStackSize(64)
            .setCreativeTab(MEC)
            .setUnlocalizedName("heart");
    GHeart =
        new GHeart(ItemID + 1, -10, 12, true)
            .setMaxStackSize(64)
            .setCreativeTab(MEC)
            .setUnlocalizedName("gheart");
    MECBucket =
        new MECBucket(ItemID + 2)
            .setCreativeTab(MEC)
            .setUnlocalizedName("mbucket")
            .setContainerItem(Item.bucketEmpty);
    MECWrench =
        new MECWrench(ItemID + 17)
            .setMaxStackSize(64)
            .setCreativeTab(MEC)
            .setUnlocalizedName("wrench");
    Batery = new ItemBattery("battery", ItemID + 3).setMaxStackSize(1);
    IBatery = new ItemInfiniteBattery("infinitebattery", ItemID + 4).setMaxDamage(1);
    CPHelmet =
        (ItemArmor)
            (new ItemArmorCP(ItemID + 11, CPA, proxy.addArmor(CPA.name()), 0))
                .setUnlocalizedName("cp_helmet")
                .func_111206_d("cp_helmet");
    CPChestPlate =
        (ItemArmor)
            (new ItemArmorCP(ItemID + 12, CPA, proxy.addArmor(CPA.name()), 1))
                .setUnlocalizedName("cp_chestplate")
                .func_111206_d("cp_chestplate");
    // CPChestPlateWW = (ItemArmor)(new ItemArmorCP(ItemID + 15, CPA, proxy.addArmor(CPA.name()),
    // 1)).setUnlocalizedName("cp_chestplate").func_111206_d("cp_chestplate");
    CPLeggings =
        (ItemArmor)
            (new ItemArmorCP(ItemID + 13, CPA, proxy.addArmor(CPA.name()), 2))
                .setUnlocalizedName("cp_leggings")
                .func_111206_d("cp_leggings");
    CPBoots =
        (ItemArmor)
            (new ItemArmorCP(ItemID + 14, CPA, proxy.addArmor(CPA.name()), 3))
                .setUnlocalizedName("cp_boots")
                .func_111206_d("cp_boots");
    CPSword = new ItemSwordCP(ItemID + 16, CP).setUnlocalizedName("cp_sword");
    CSoulPart = new ItemMEC(ItemID + 18).setUnlocalizedName("csp");
    PSoulPart = new ItemMEC(ItemID + 19).setUnlocalizedName("psp");
    CWSoulPart = new ItemMEC(ItemID + 20).setUnlocalizedName("cwsp");
    ESoulPart = new ItemMEC(ItemID + 21).setUnlocalizedName("esp");
    ZSoulPart = new ItemMEC(ItemID + 22).setUnlocalizedName("zsp");
    CRSoulPart = new ItemMEC(ItemID + 23).setUnlocalizedName("crsp");
    SSoulPart = new ItemMEC(ItemID + 24).setUnlocalizedName("ssp");
    HSoulPart = new ItemMEC(ItemID + 25).setUnlocalizedName("hsp");
    GameRegistry.registerItem(CSoulPart, "Chicken Soul Part");
    GameRegistry.registerItem(PSoulPart, "Pig Soul Part");
    GameRegistry.registerItem(CWSoulPart, "Cow Soul Part");
    GameRegistry.registerItem(ESoulPart, "Enderman Soul Part");
    GameRegistry.registerItem(ZSoulPart, "Zombie Soul Part");
    GameRegistry.registerItem(CRSoulPart, "Creeper Soul Part");
    GameRegistry.registerItem(SSoulPart, "Spider Soul Part");
    GameRegistry.registerItem(HSoulPart, "Horse Soul Part");
    GameRegistry.registerItem(CPSword, "Corruption Sword");
    GameRegistry.registerItem(CPHelmet, "Corruption Helmet");
    GameRegistry.registerItem(CPChestPlate, "Corruption Chestplate");
    GameRegistry.registerItem(CPLeggings, "Corruption Leggings");
    GameRegistry.registerItem(CPBoots, "Corruption Boots");
    GameRegistry.registerItem(IronPlate, "Iron Plate");
    GameRegistry.registerItem(GoldPlate, "Gold Plate");
    GameRegistry.registerItem(CopperPlate, "Copper Plate");
    GameRegistry.registerItem(SteelPlate, "Steel Plate");
    GameRegistry.registerItem(CopperIngot, "Copper Ingot");
    GameRegistry.registerItem(SteelIngot, "Steel Ingot");
    GameRegistry.registerItem(Heart, "Innocent Heart");
    GameRegistry.registerItem(GHeart, "Guilty Heart");
    GameRegistry.registerItem(MECWrench, "MEC Wrench");
    GameRegistry.registerItem(MECBucket, "Pressure Machine Fuel");
    GameRegistry.registerItem(Batery, "Battery");
    GameRegistry.registerItem(IBatery, "Infinite Battery");
    GameRegistry.registerPickupHandler(new PickupHandler());
    GameRegistry.registerCraftingHandler(new CraftingHandler());
    LanguageRegistry.addName(CSoulPart, "\u00A7c" + "Chicken Soul Part");
    LanguageRegistry.addName(PSoulPart, "\u00A7c" + "Pig Soul Part");
    LanguageRegistry.addName(CWSoulPart, "\u00A7c" + "Cow Soul Part");
    LanguageRegistry.addName(ESoulPart, "\u00A7c" + "Enderman Soul Part");
    LanguageRegistry.addName(ZSoulPart, "\u00A7c" + "Zombie Soul Part");
    LanguageRegistry.addName(CRSoulPart, "\u00A7c" + "Creeper Soul Part");
    LanguageRegistry.addName(SSoulPart, "\u00A7c" + "Spider Soul Part");
    LanguageRegistry.addName(HSoulPart, "\u00A7c" + "Horse Soul Part");
    LanguageRegistry.addName(CPSword, "\u00A7e" + "Corruption Sword");
    LanguageRegistry.addName(CPHelmet, "\u00A7e" + "Corruption Helmet");
    LanguageRegistry.addName(CPChestPlate, "\u00A7e" + "Corruption Chestplate");
    LanguageRegistry.addName(CPLeggings, "\u00A7e" + "Corruption Leggings");
    LanguageRegistry.addName(CPBoots, "\u00A7e" + "Corruption Boots");
    LanguageRegistry.addName(IronPlate, "" + "Iron Plate");
    LanguageRegistry.addName(GoldPlate, "Gold Plate");
    LanguageRegistry.addName(CopperPlate, "Copper Plate");
    LanguageRegistry.addName(SteelPlate, "Steel Plate");
    LanguageRegistry.addName(CopperIngot, "Copper Ingot");
    LanguageRegistry.addName(SteelIngot, "Steel Ingot");
    LanguageRegistry.addName(Batery, "Battery");
    LanguageRegistry.addName(IBatery, "Infinite Battery");
    LanguageRegistry.instance().addStringLocalization("itemGroup.MEC", "en_US", "ME-Craft");
    LanguageRegistry.addName(Heart, "Innocent Heart");
    LanguageRegistry.addName(GHeart, "Guilty Heart");
    LanguageRegistry.addName(MECBucket, "Pressure Machine Fuel");
    LanguageRegistry.addName(MECWrench, "MEC Wrench");
    GameRegistry.registerBlock(blocksolar, "Solar Generator");
    GameRegistry.registerBlock(blockbat, "Battery Box");
    GameRegistry.registerBlock(CPSnad, "Corruption Sand");
    GameRegistry.registerBlock(CopperOre, "Copper Ore");
    GameRegistry.registerBlock(Mermer, "Marble");
    GameRegistry.registerBlock(KirikMermer, "Cobblemurble");
    GameRegistry.registerBlock(AMermer, "Light Blue Marble");
    GameRegistry.registerBlock(BMermer, "Light Gray Marble");
    GameRegistry.registerBlock(CMermer, "Lime Marble");
    GameRegistry.registerBlock(DMermer, "Magenta Marble");
    GameRegistry.registerBlock(EMermer, "Gray Marble");
    GameRegistry.registerBlock(FMermer, "Brown Marble");
    GameRegistry.registerBlock(GMermer, "Red Marble");
    GameRegistry.registerBlock(HMermer, "Blue Marble");
    GameRegistry.registerBlock(SMermer, "Fake Marble");
    GameRegistry.registerBlock(IMermer, "Purple Marble");
    GameRegistry.registerBlock(JMermer, "Pink Marble");
    GameRegistry.registerBlock(KMermer, "Yellow Marble");
    GameRegistry.registerBlock(LMermer, "Black Marble");
    GameRegistry.registerBlock(MMermer, "Cyan Marble");
    GameRegistry.registerBlock(NMermer, "Orange Marble");
    GameRegistry.registerBlock(OMermer, "Green Marble");
    GameRegistry.registerBlock(AMermerB, "Light Blue Marble Brick");
    GameRegistry.registerBlock(BMermerB, "Light Gray Marble Brick");
    GameRegistry.registerBlock(CMermerB, "Lime Marble Brick");
    GameRegistry.registerBlock(DMermerB, "Magenta Marble Brick");
    GameRegistry.registerBlock(EMermerB, "Gray Marble Brick");
    GameRegistry.registerBlock(FMermerB, "Brown Marble Brick");
    GameRegistry.registerBlock(GMermerB, "Red Marble Brick");
    GameRegistry.registerBlock(HMermerB, "Blue Marble Brick");
    GameRegistry.registerBlock(IMermerB, "Purple Marble Brick");
    GameRegistry.registerBlock(JMermerB, "Pink Marble Brick");
    GameRegistry.registerBlock(KMermerB, "Yellow Marble Brick");
    GameRegistry.registerBlock(LMermerB, "Black Marble Brick");
    GameRegistry.registerBlock(MMermerB, "Cyan Marble Brick");
    GameRegistry.registerBlock(NMermerB, "Orange Marble Brick");
    GameRegistry.registerBlock(OMermerB, "Green Marble Brick");
    GameRegistry.registerBlock(MermerB, "Marble Brick");
    GameRegistry.registerBlock(Deneme, "Pressure Machine");
    GameRegistry.registerBlock(DenemeB, "Pressure Machine Working");
    ClientRegistry.bindTileEntitySpecialRenderer(
        TileEntityCopperWire.class, new RenderCopperWire());
    ClientRegistry.bindTileEntitySpecialRenderer(
        TileEntitySolarGenerator.class, new RenderSolarPanel());

    GameRegistry.registerTileEntity(TileEntityCopperWire.class, "Copper Cable");
    GameRegistry.registerBlock(CopperCable, ItemBlockCopperWire.class, "");
    proxy.registerCopperWireTileEntity();
    proxy.registerSG();
    proxy.registerBB();
    GameRegistry.registerBlock(MECLiquid, "MECLiquid");
    GameRegistry.registerBlock(MECLiquidStill, "MECLiquidStill");
    GameRegistry.registerTileEntity(MECTileEntity.class, "MECTile");
    NetworkRegistry.instance().registerGuiHandler(this, guihandler);
    LanguageRegistry.addName(blockbat, "Battery Box");
    LanguageRegistry.addName(blocksolar, "Solar Generator");
    LanguageRegistry.addName(MECLiquid, "MECLiquid");
    LanguageRegistry.addName(MECLiquidStill, "MECLiquidStill");
    LanguageRegistry.addName(KirikMermer, "CobbleMurble");
    LanguageRegistry.addName(CPSnad, "Corruption Sand");
    LanguageRegistry.addName(CopperOre, "Copper Ore");
    LanguageRegistry.addName(Mermer, "Marble");
    LanguageRegistry.addName(Deneme, "Pressure Machine");
    LanguageRegistry.addName(DenemeB, "Pressure Machine");
    LanguageRegistry.addName(MermerB, "Marble Brick");
    LanguageRegistry.addName(SMermer, "Fake Marble");
    LanguageRegistry.addName(AMermer, "Light Blue Marble");
    LanguageRegistry.addName(BMermer, "Light Gray Marble");
    LanguageRegistry.addName(CMermer, "Lime Marble");
    LanguageRegistry.addName(DMermer, "Magenta Marble");
    LanguageRegistry.addName(EMermer, "Gray Marble");
    LanguageRegistry.addName(FMermer, "Brown Marble");
    LanguageRegistry.addName(GMermer, "Red Marble");
    LanguageRegistry.addName(HMermer, "Blue Marble");
    LanguageRegistry.addName(IMermer, "Purple Marble");
    LanguageRegistry.addName(JMermer, "Pink Marble");
    LanguageRegistry.addName(KMermer, "Yellow Marble");
    LanguageRegistry.addName(LMermer, "Black Marble");
    LanguageRegistry.addName(MMermer, "Cyan Marble");
    LanguageRegistry.addName(NMermer, "Orange Marble");
    LanguageRegistry.addName(OMermer, "Green Marble");
    LanguageRegistry.addName(AMermerB, "Light Blue Marble Brick");
    LanguageRegistry.addName(BMermerB, "Light Gray Marble Brick");
    LanguageRegistry.addName(CMermerB, "Lime Marble Brick");
    LanguageRegistry.addName(DMermerB, "Magenta Marble Brick");
    LanguageRegistry.addName(EMermerB, "Gray Marble Brick");
    LanguageRegistry.addName(FMermerB, "Brown Marble Brick");
    LanguageRegistry.addName(GMermerB, "Red Marble Brick");
    LanguageRegistry.addName(HMermerB, "Blue Marble Brick");
    LanguageRegistry.addName(IMermerB, "Purple Marble Brick");
    LanguageRegistry.addName(JMermerB, "Pink Marble Brick");
    LanguageRegistry.addName(KMermerB, "Yellow Marble Brick");
    LanguageRegistry.addName(LMermerB, "Black Marble Brick");
    LanguageRegistry.addName(MMermerB, "Cyan Marble Brick");
    LanguageRegistry.addName(NMermerB, "Orange Marble Brick");
    LanguageRegistry.addName(OMermerB, "Green Marble Brick");
    OreDictionary.registerOre("copperWire", new ItemStack(CopperCable, 1, 0));

    UniversalElectricity.isVoltageSensitive = true;
    UniversalElectricity.isNetworkActive = true;
    GameRegistry.registerTileEntity(TileEntityCoalGenerator.class, "Generator");
    GameRegistry.registerTileEntity(TileEntityElectricFurnace.class, "PM");
    GameRegistry.registerTileEntity(TileEntityBatteryBox.class, "BB");
    GameRegistry.registerTileEntity(TileEntityEF.class, "EF");
    GameRegistry.registerTileEntity(TileEntitySolarGenerator.class, "SG");
    GameRegistry.registerBlock(blockMachine, ItemBlockBasicMachine.class, "Temel Machine");
    OreDictionary.registerOre("generator", ((BlockBasicMachine) blockMachine).getCoalGenerator());
    OreDictionary.registerOre("PM", ((BlockBasicMachine) blockMachine).getElectricFurnace());
    OreDictionary.registerOre("EM", ((BlockBasicMachine) blockMachine).getAS());
    OreDictionary.registerOre("SG", new ItemStack(blocksolar, 1));
    LanguageRegistry.addName(blockMachine.getCoalGenerator(), "Generator");
    LanguageRegistry.addName(blockMachine.getElectricFurnace(), "Electric Pressure Machine");
    LanguageRegistry.addName(blockMachine.getAS(), "Electric Furnace");

    LanguageRegistry.addName(CopperCable, "Copper Cable");
    if (CopperCable != null) {
      UniversalElectricity.isNetworkActive = true;
    }
    this.addAchievementLocalizations();
    LanguageRegistry.instance().addStringLocalization("achievement.Marble", "Start the Mod");
    LanguageRegistry.instance()
        .addStringLocalization("achievement.Marble.desc", "You are starting the Mod");
    LanguageRegistry.instance().addStringLocalization("achievement.Marble2", "Get The Marble");
    LanguageRegistry.instance()
        .addStringLocalization("achievement.Marble2.desc", "You are Learning Something!");
    LanguageRegistry.instance().addStringLocalization("achievement.Copper", "Find Copper");
    LanguageRegistry.instance()
        .addStringLocalization("achievement.Copper.desc", "You found a new Ore");
    LanguageRegistry.instance()
        .addStringLocalization("achievement.Pressure", "Make a Pressure Machine");
    LanguageRegistry.instance()
        .addStringLocalization("achievement.Pressure.desc", "You can make awesome things!");
    LanguageRegistry.instance().addStringLocalization("achievement.Heart", "Friend Slayer");
    LanguageRegistry.instance()
        .addStringLocalization("achievement.Heart.desc", "You killed a Friend Mip");
    LanguageRegistry.instance().addStringLocalization("achievement.GHeart", "Enemy Slayer");
    LanguageRegistry.instance()
        .addStringLocalization("achievement.GHeart.desc", "You killed a Enemy Banion");

    MinecraftForge.EVENT_BUS.register(new Sounds());
    ModLoader.addBiome(MarbleBiome);
    GameRegistry.registerWorldGenerator(worldGen);
    GameRegistry.registerWorldGenerator(worldGenCopper);
    GameRegistry.registerWorldGenerator(worldGenML);

    // GameRegistry.registerTileEntity(TileEntityRedstoneWireBlock.class,
    // "TileEntityRedstoneWireBlock");
    AchievementPage.registerAchievementPage(page1);

    GameRegistry.registerTileEntity(TileEntityHiveCore.class, "TileEntityRedstoneNetworkCore");

    // GameRegistry.registerTileEntity(TileEntityRedstoneWireBlock.class,
    // "TileEntityRedstoneWireBlock");

    // Recipes(Formuller):
    ModLoader.addShapelessRecipe(
        new ItemStack(SMermer, 2), Block.stone, new ItemStack(Item.dyePowder, 1, 15));
    ModLoader.addShapelessRecipe(
        new ItemStack(AMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 12));
    ModLoader.addShapelessRecipe(
        new ItemStack(BMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 7));
    ModLoader.addShapelessRecipe(
        new ItemStack(CMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 10));
    ModLoader.addShapelessRecipe(
        new ItemStack(DMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 13));
    ModLoader.addShapelessRecipe(
        new ItemStack(EMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 8));
    ModLoader.addShapelessRecipe(
        new ItemStack(FMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 3));
    ModLoader.addShapelessRecipe(
        new ItemStack(GMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 1));
    ModLoader.addShapelessRecipe(
        new ItemStack(HMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 4));
    ModLoader.addShapelessRecipe(
        new ItemStack(IMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 5));
    ModLoader.addShapelessRecipe(
        new ItemStack(JMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 9));
    ModLoader.addShapelessRecipe(
        new ItemStack(KMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 11));
    ModLoader.addShapelessRecipe(
        new ItemStack(LMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 0));
    ModLoader.addShapelessRecipe(
        new ItemStack(MMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 6));
    ModLoader.addShapelessRecipe(
        new ItemStack(NMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 14));
    ModLoader.addShapelessRecipe(
        new ItemStack(OMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 2));
    ModLoader.addShapelessRecipe(
        new ItemStack(AMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 12));
    ModLoader.addShapelessRecipe(
        new ItemStack(BMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 7));
    ModLoader.addShapelessRecipe(
        new ItemStack(CMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 10));
    ModLoader.addShapelessRecipe(
        new ItemStack(DMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 13));
    ModLoader.addShapelessRecipe(
        new ItemStack(EMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 8));
    ModLoader.addShapelessRecipe(
        new ItemStack(FMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 3));
    ModLoader.addShapelessRecipe(
        new ItemStack(GMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 1));
    ModLoader.addShapelessRecipe(
        new ItemStack(HMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 4));
    ModLoader.addShapelessRecipe(
        new ItemStack(IMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 5));
    ModLoader.addShapelessRecipe(
        new ItemStack(JMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 9));
    ModLoader.addShapelessRecipe(
        new ItemStack(KMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 11));
    ModLoader.addShapelessRecipe(
        new ItemStack(LMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 0));
    ModLoader.addShapelessRecipe(
        new ItemStack(MMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 6));
    ModLoader.addShapelessRecipe(
        new ItemStack(NMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 14));
    ModLoader.addShapelessRecipe(
        new ItemStack(OMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 2));
    ModLoader.addRecipe(new ItemStack(MermerB, 4), "xx", "xx", 'x', Mermer);
    ModLoader.addRecipe(new ItemStack(MermerB, 4), "xx", "xx", 'x', SMermer);
    ModLoader.addRecipe(new ItemStack(AMermerB, 4), "xx", "xx", 'x', AMermer);
    ModLoader.addRecipe(new ItemStack(BMermerB, 4), "xx", "xx", 'x', BMermer);
    ModLoader.addRecipe(new ItemStack(CMermerB, 4), "xx", "xx", 'x', CMermer);
    ModLoader.addRecipe(new ItemStack(DMermerB, 4), "xx", "xx", 'x', DMermer);
    ModLoader.addRecipe(new ItemStack(EMermerB, 4), "xx", "xx", 'x', EMermer);
    ModLoader.addRecipe(new ItemStack(FMermerB, 4), "xx", "xx", 'x', FMermer);
    ModLoader.addRecipe(new ItemStack(GMermerB, 4), "xx", "xx", 'x', GMermer);
    ModLoader.addRecipe(new ItemStack(HMermerB, 4), "xx", "xx", 'x', HMermer);
    ModLoader.addRecipe(new ItemStack(IMermerB, 4), "xx", "xx", 'x', IMermer);
    ModLoader.addRecipe(new ItemStack(JMermerB, 4), "xx", "xx", 'x', JMermer);
    ModLoader.addRecipe(new ItemStack(KMermerB, 4), "xx", "xx", 'x', KMermer);
    ModLoader.addRecipe(new ItemStack(LMermerB, 4), "xx", "xx", 'x', LMermer);
    ModLoader.addRecipe(new ItemStack(MMermerB, 4), "xx", "xx", 'x', MMermer);
    ModLoader.addRecipe(new ItemStack(NMermerB, 4), "xx", "xx", 'x', NMermer);
    ModLoader.addRecipe(new ItemStack(OMermerB, 4), "xx", "xx", 'x', OMermer);
    ModLoader.addRecipe(
        new ItemStack(Deneme, 1),
        "xxx",
        "yzy",
        "xxx",
        'x',
        SteelIngot,
        'y',
        Block.pistonBase,
        'z',
        Block.stone);
    ModLoader.addRecipe(
        new ItemStack(Batery, 1),
        " x ",
        "yzy",
        "yzy",
        'x',
        CopperCable,
        'y',
        SteelIngot,
        'z',
        Item.redstone);
    ModLoader.addRecipe(
        new ItemStack(SteelIngot, 1), " x ", "xyx", " x ", 'x', Item.coal, 'y', Item.ingotIron);
    ModLoader.addSmelting(CopperOre.blockID, new ItemStack(CopperIngot, 1), 2.0f);
    ModLoader.addShapelessRecipe(new ItemStack(SteelIngot, 2), Item.ingotIron, CopperIngot);
    TickRegistry.registerTickHandler(new TickHandler(), Side.SERVER);
  }
예제 #10
0
  protected void genAchievementBackground(int par1, int par2, float par3) {
    int var4 =
        MathHelper.floor_double(
            this.field_74117_m + (this.guiMapX - this.field_74117_m) * (double) par3);
    int var5 =
        MathHelper.floor_double(
            this.field_74115_n + (this.guiMapY - this.field_74115_n) * (double) par3);

    if (var4 < guiMapTop) {
      var4 = guiMapTop;
    }

    if (var5 < guiMapLeft) {
      var5 = guiMapLeft;
    }

    if (var4 >= guiMapBottom) {
      var4 = guiMapBottom - 1;
    }

    if (var5 >= guiMapRight) {
      var5 = guiMapRight - 1;
    }

    int var6 = this.mc.renderEngine.getTexture("/terrain.png");
    int var7 = this.mc.renderEngine.getTexture("/achievement/bg.png");
    int var8 = (this.width - this.achievementsPaneWidth) / 2;
    int var9 = (this.height - this.achievementsPaneHeight) / 2;
    int var10 = var8 + 16;
    int var11 = var9 + 17;
    this.zLevel = 0.0F;
    GL11.glDepthFunc(GL11.GL_GEQUAL);
    GL11.glPushMatrix();
    GL11.glTranslatef(0.0F, 0.0F, -200.0F);
    GL11.glEnable(GL11.GL_TEXTURE_2D);
    GL11.glDisable(GL11.GL_LIGHTING);
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glEnable(GL11.GL_COLOR_MATERIAL);
    this.mc.renderEngine.bindTexture(var6);
    int var12 = var4 + 288 >> 4;
    int var13 = var5 + 288 >> 4;
    int var14 = (var4 + 288) % 16;
    int var15 = (var5 + 288) % 16;
    Random var21 = new Random();
    int var22;
    int var25;
    int var24;
    int var26;

    for (var22 = 0; var22 * 16 - var15 < 155; ++var22) {
      float var23 = 0.6F - (float) (var13 + var22) / 25.0F * 0.3F;
      GL11.glColor4f(var23, var23, var23, 1.0F);

      for (var24 = 0; var24 * 16 - var14 < 224; ++var24) {
        var21.setSeed((long) (1234 + var12 + var24));
        var21.nextInt();
        var25 = var21.nextInt(1 + var13 + var22) + (var13 + var22) / 2;
        var26 = Block.sand.blockIndexInTexture;

        if (var25 <= 37 && var13 + var22 != 35) {
          if (var25 == 22) {
            if (var21.nextInt(2) == 0) {
              var26 = Block.oreDiamond.blockIndexInTexture;
            } else {
              var26 = Block.oreRedstone.blockIndexInTexture;
            }
          } else if (var25 == 10) {
            var26 = Block.oreIron.blockIndexInTexture;
          } else if (var25 == 8) {
            var26 = Block.oreCoal.blockIndexInTexture;
          } else if (var25 > 4) {
            var26 = Block.stone.blockIndexInTexture;
          } else if (var25 > 0) {
            var26 = Block.dirt.blockIndexInTexture;
          }
        } else {
          var26 = Block.bedrock.blockIndexInTexture;
        }

        this.drawTexturedModalRect(
            var10 + var24 * 16 - var14,
            var11 + var22 * 16 - var15,
            var26 % 16 << 4,
            var26 >> 4 << 4,
            16,
            16);
      }
    }

    GL11.glEnable(GL11.GL_DEPTH_TEST);
    GL11.glDepthFunc(GL11.GL_LEQUAL);
    GL11.glDisable(GL11.GL_TEXTURE_2D);
    int var27;
    int var30;
    List<Achievement> achievementList =
        (currentPage == -1
            ? minecraftAchievements
            : AchievementPage.getAchievementPage(currentPage).getAchievements());

    for (var22 = 0; var22 < achievementList.size(); ++var22) {
      Achievement var33 = achievementList.get(var22);

      if (var33.parentAchievement != null && achievementList.contains(var33.parentAchievement)) {
        var24 = var33.displayColumn * 24 - var4 + 11 + var10;
        var25 = var33.displayRow * 24 - var5 + 11 + var11;
        var26 = var33.parentAchievement.displayColumn * 24 - var4 + 11 + var10;
        var27 = var33.parentAchievement.displayRow * 24 - var5 + 11 + var11;
        boolean var28 = this.statFileWriter.hasAchievementUnlocked(var33);
        boolean var29 = this.statFileWriter.canUnlockAchievement(var33);
        var30 =
            Math.sin((double) (Minecraft.getSystemTime() % 600L) / 600.0D * Math.PI * 2.0D) > 0.6D
                ? 255
                : 130;
        int var31 = -16777216;

        if (var28) {
          var31 = -9408400;
        } else if (var29) {
          var31 = 65280 + (var30 << 24);
        }

        this.drawHorizontalLine(var24, var26, var25, var31);
        this.drawVerticalLine(var26, var25, var27, var31);
      }
    }

    Achievement var32 = null;
    RenderItem var37 = new RenderItem();
    RenderHelper.enableGUIStandardItemLighting();
    GL11.glDisable(GL11.GL_LIGHTING);
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glEnable(GL11.GL_COLOR_MATERIAL);
    int var42;
    int var41;

    for (var24 = 0; var24 < achievementList.size(); ++var24) {
      Achievement var35 = achievementList.get(var24);
      var26 = var35.displayColumn * 24 - var4;
      var27 = var35.displayRow * 24 - var5;

      if (var26 >= -24 && var27 >= -24 && var26 <= 224 && var27 <= 155) {
        float var38;

        if (this.statFileWriter.hasAchievementUnlocked(var35)) {
          var38 = 1.0F;
          GL11.glColor4f(var38, var38, var38, 1.0F);
        } else if (this.statFileWriter.canUnlockAchievement(var35)) {
          var38 =
              Math.sin((double) (Minecraft.getSystemTime() % 600L) / 600.0D * Math.PI * 2.0D) < 0.6D
                  ? 0.6F
                  : 0.8F;
          GL11.glColor4f(var38, var38, var38, 1.0F);
        } else {
          var38 = 0.3F;
          GL11.glColor4f(var38, var38, var38, 1.0F);
        }

        this.mc.renderEngine.bindTexture(var7);
        var42 = var10 + var26;
        var41 = var11 + var27;

        if (var35.getSpecial()) {
          this.drawTexturedModalRect(var42 - 2, var41 - 2, 26, 202, 26, 26);
        } else {
          this.drawTexturedModalRect(var42 - 2, var41 - 2, 0, 202, 26, 26);
        }

        if (!this.statFileWriter.canUnlockAchievement(var35)) {
          float var40 = 0.1F;
          GL11.glColor4f(var40, var40, var40, 1.0F);
          var37.field_77024_a = false;
        }

        GL11.glEnable(GL11.GL_LIGHTING);
        GL11.glEnable(GL11.GL_CULL_FACE);
        var37.renderItemAndEffectIntoGUI(
            this.mc.fontRenderer, this.mc.renderEngine, var35.theItemStack, var42 + 3, var41 + 3);
        GL11.glDisable(GL11.GL_LIGHTING);

        if (!this.statFileWriter.canUnlockAchievement(var35)) {
          var37.field_77024_a = true;
        }

        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

        if (par1 >= var10
            && par2 >= var11
            && par1 < var10 + 224
            && par2 < var11 + 155
            && par1 >= var42
            && par1 <= var42 + 22
            && par2 >= var41
            && par2 <= var41 + 22) {
          var32 = var35;
        }
      }
    }

    GL11.glDisable(GL11.GL_DEPTH_TEST);
    GL11.glEnable(GL11.GL_BLEND);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    this.mc.renderEngine.bindTexture(var7);
    this.drawTexturedModalRect(
        var8, var9, 0, 0, this.achievementsPaneWidth, this.achievementsPaneHeight);
    GL11.glPopMatrix();
    this.zLevel = 0.0F;
    GL11.glDepthFunc(GL11.GL_LEQUAL);
    GL11.glDisable(GL11.GL_DEPTH_TEST);
    GL11.glEnable(GL11.GL_TEXTURE_2D);
    super.drawScreen(par1, par2, par3);

    if (var32 != null) {
      String var34 = StatCollector.translateToLocal(var32.getName());
      String var36 = var32.getDescription();
      var26 = par1 + 12;
      var27 = par2 - 4;

      if (this.statFileWriter.canUnlockAchievement(var32)) {
        var42 = Math.max(this.fontRenderer.getStringWidth(var34), 120);
        var41 = this.fontRenderer.splitStringWidth(var36, var42);

        if (this.statFileWriter.hasAchievementUnlocked(var32)) {
          var41 += 12;
        }

        this.drawGradientRect(
            var26 - 3,
            var27 - 3,
            var26 + var42 + 3,
            var27 + var41 + 3 + 12,
            -1073741824,
            -1073741824);
        this.fontRenderer.drawSplitString(var36, var26, var27 + 12, var42, -6250336);

        if (this.statFileWriter.hasAchievementUnlocked(var32)) {
          this.fontRenderer.drawStringWithShadow(
              StatCollector.translateToLocal("achievement.taken"),
              var26,
              var27 + var41 + 4,
              -7302913);
        }
      } else {
        var42 = Math.max(this.fontRenderer.getStringWidth(var34), 120);
        String var39 =
            StatCollector.translateToLocalFormatted(
                "achievement.requires",
                new Object[] {StatCollector.translateToLocal(var32.parentAchievement.getName())});
        var30 = this.fontRenderer.splitStringWidth(var39, var42);
        this.drawGradientRect(
            var26 - 3,
            var27 - 3,
            var26 + var42 + 3,
            var27 + var30 + 12 + 3,
            -1073741824,
            -1073741824);
        this.fontRenderer.drawSplitString(var39, var26, var27 + 12, var42, -9416624);
      }

      this.fontRenderer.drawStringWithShadow(
          var34,
          var26,
          var27,
          this.statFileWriter.canUnlockAchievement(var32)
              ? (var32.getSpecial() ? -128 : -1)
              : (var32.getSpecial() ? -8355776 : -8355712));
    }

    GL11.glEnable(GL11.GL_DEPTH_TEST);
    GL11.glEnable(GL11.GL_LIGHTING);
    RenderHelper.disableStandardItemLighting();
  }
 private static void registerAchievementPage() {
   AchievementPage.registerAchievementPage(page1);
   achievementslist.clear();
 }