@Override
  protected void registerItem(int partIndex) {
    switch (partIndex) {
      case 0:
        {
          Item item = ItemList.greenClothHead.get();
          LanguageRegistry.addName(item, "Green Cloth Helmet");
          break;
        }
      case 1:
        {
          Item item = ItemList.greenClothChest.get();
          LanguageRegistry.addName(item, "Green Cloth Chestplate");
          break;
        }
      case 2:
        {
          Item item = ItemList.greenClothLeg.get();
          LanguageRegistry.addName(item, "Green Cloth Leggings");
        }

      case 3:
        {
          Item item = ItemList.greenClothBoots.get();
          LanguageRegistry.addName(item, "Green Cloth Boots");
        }
    }
  }
Beispiel #2
0
  private void addBlocks() {
    // HelloWorldBlock
    blockHelloWorld = new BlockHelloWorld(blockHelloWorldId);
    GameRegistry.registerBlock(blockHelloWorld);
    LanguageRegistry.addName(blockHelloWorld, "Hello World Block");

    // FossilFuel PowerStation Blocks
    blockFossilFuelPSIdle = new BlockFossilFuelPS(blockFossilFuelPSIdleId, false);
    GameRegistry.registerBlock(blockFossilFuelPSIdle);
    LanguageRegistry.addName(blockFossilFuelPSIdle, "Fossil-Fuel Power Station (Idle)");

    blockFossilFuelPSActive = new BlockFossilFuelPS(blockFossilFuelPSActiveId, true);
    GameRegistry.registerBlock(blockFossilFuelPSActive);
    LanguageRegistry.addName(blockFossilFuelPSActive, "Fossil-Fuel Power Station");

    // Accumulator Blocks
    blockAccumulator = new BlockAccumulator(blockAccumulatorId);
    GameRegistry.registerBlock(blockAccumulator);
    LanguageRegistry.addName(blockAccumulator, "Energy Accumulator");

    // Cable Block
    blockCable = new BlockCable(blockCableId, 1);
    GameRegistry.registerBlock(blockCable);
    LanguageRegistry.addName(blockCable, "Cable");
  }
 @Override
 public String getAdjective() {
   String translation =
       LanguageRegistry.instance().getStringLocalization("openperipheral.turtle.sensor.adjective");
   return translation == ""
       ? LanguageRegistry.instance()
           .getStringLocalization("openperipheral.turtle.sensor.adjective", "en_US")
       : translation;
 }
Beispiel #4
0
 private void init() {
   LanguageRegistry.addName(this, ModObject.itemMachinePart.name);
   GameRegistry.registerItem(this, ModObject.itemMachinePart.unlocalisedName);
   for (int i = 0; i < MachinePart.values().length; i++) {
     LanguageRegistry.instance()
         .addStringLocalization(
             getUnlocalizedName() + "." + MachinePart.values()[i].unlocalisedName + ".name",
             MachinePart.values()[i].uiName);
   }
 }
  @Init
  public void init(FMLInitializationEvent event) {
    KeyBindingRegistry.registerKeyBinding(new CCKeyHandler(statsKey));

    LanguageRegistry.instance().addStringLocalization("itemGroup.tabCC", Reference.TABNAME);

    // testItem
    testItem = new ItemBase(testItemId).setUnlocalizedName("testItem");
    LanguageRegistry.addName(testItem, Reference.TEST_ITEM);
  }
  public static void Init() {

    dustTin = new dustTin(NetherOresIDS.TIN_DUST_ITEM_ID);
    dustCopper = new dustCopper(NetherOresIDS.COPPER_DUST_ITEM_ID);
    dustSilver = new dustSilver(NetherOresIDS.SILVER_DUST_ITEM_ID);

    ingotTin = new ItemTin(NetherOresIDS.TIN_ITEM_ID);
    ingotCopper = new ItemCopper(NetherOresIDS.COPPER_ITEM_ID);
    ingotSilver = new ItemSilver(NetherOresIDS.SILVER_ITEM_ID);

    netherAmulet = new NetherAmulet(NetherOresIDS.NETHER_AMULET_ID);

    lavaPearl = new LavaPearl(NetherOresIDS.LAVA_PEARL_ID);

    ItemChain = new ItemChain(NetherOresIDS.ITEM_CHAIN_ID);

    OreDictionary.registerOre("dustCopper", new ItemStack(dustCopper));
    OreDictionary.registerOre("dustTin", new ItemStack(dustTin));
    OreDictionary.registerOre("dustSilver", new ItemStack(dustSilver));

    OreDictionary.registerOre("ingotCopper", new ItemStack(ingotCopper));
    OreDictionary.registerOre("ingotTin", new ItemStack(ingotTin));
    OreDictionary.registerOre("ingotSilver", new ItemStack(ingotSilver));

    LanguageRegistry.addName(dustTin, "Tin Dust");
    LanguageRegistry.addName(dustCopper, "Copper Dust");
    LanguageRegistry.addName(dustSilver, "Silver Dust");

    LanguageRegistry.addName(ingotTin, "Tin Ingot");
    LanguageRegistry.addName(ingotCopper, "Copper Ingot");
    LanguageRegistry.addName(ingotSilver, "Silver Ingot");
    LanguageRegistry.addName(netherAmulet, "Nether Amulet");
    LanguageRegistry.addName(lavaPearl, "Lava Pearl");
    LanguageRegistry.addName(ItemChain, "Gold Chain");
  }
  public void Init() {
    int defMR = AMCore.config.getConfigurableEnchantmentID("magic_resist", 100);

    Enchantment.addToBookList(magicResist);
    Enchantment.addToBookList(soulbound);

    LanguageRegistry.instance()
        .addStringLocalization("enchantment.magicresist", "en_US", "Magic Resistance");
    LanguageRegistry.instance()
        .addStringLocalization("enchantment.soulbound", "en_US", "Soulbound");
  }
  private void initBlazeIngot() {
    BlazeIngot =
        (new BlazeItem(DefaultProps.BLAZE_INGOT_ID)).setIconCoord(0, 0).setItemName("blazeIngot");

    LanguageRegistry.addName(BlazeIngot, DefaultNames.EN.BLAZE_INGOT);
    LanguageRegistry.instance().addNameForObject(BlazeIngot, "ja_JP", DefaultNames.JP.BLAZE_INGOT);

    GameRegistry.addRecipe(
        new ItemStack(BlazeIngot, 1),
        new Object[] {"XX", "XX", Character.valueOf('X'), Item.blazeRod});
  }
Beispiel #9
0
 public static void addNames() {
   LanguageRegistry.instance()
       .addStringLocalization(
           "entity." + Names.entityAssassin_unlocalizedName + ".name", Names.entityAssassin_name);
   LanguageRegistry.instance()
       .addStringLocalization(
           "entity." + Names.entityCitizen_unlocalizedName + ".name", Names.entityCitizen_name);
   LanguageRegistry.instance()
       .addStringLocalization(
           "entity." + Names.entityGoblin_unlocalizedName + ".name", Names.entityGoblin_name);
 }
Beispiel #10
0
 public void addNames() {
   LanguageRegistry.addName(stonewall, "Stone Wall");
   LanguageRegistry.addName(stonebrickwall, "Stonebrick Wall");
   LanguageRegistry.addName(crackedbrickwall, "Cracked Stonebrick Wall");
   LanguageRegistry.addName(mossbrickwall, "Moss Stonebrick Wall");
   LanguageRegistry.addName(brickwall, "Brick Wall");
   LanguageRegistry.addName(lapiswall, "Lapis Lazuli Wall");
   LanguageRegistry.addName(woodenwall, "Wooden Wall");
   LanguageRegistry.addName(sandstonewall, "Sandstone Wall");
   LanguageRegistry.addName(Stonebrick1, "Stone Brick");
   LanguageRegistry.addName(Netherbrickwall, "Netherbrick Wall");
 }
Beispiel #11
0
  public static void loadNames() {
    LanguageRegistry.addName(oreCopper, BlockOreRef.ORE_COPPER_NAME);
    MinecraftForge.setBlockHarvestLevel(oreCopper, "pickaxe", 1);

    LanguageRegistry.addName(oreTin, BlockOreRef.ORE_TIN_NAME);
    MinecraftForge.setBlockHarvestLevel(oreTin, "pickaxe", 1);

    LanguageRegistry.addName(oreZinc, BlockOreRef.ORE_ZINC_NAME);
    MinecraftForge.setBlockHarvestLevel(oreZinc, "pickaxe", 1);

    LanguageRegistry.addName(steamBoiler, BlockMachineRef.MACHINE_STEAM_BOILER_NAME);
    MinecraftForge.setBlockHarvestLevel(steamBoiler, "pickaxe", 1);
  }
  @EventHandler
  public void load(FMLInitializationEvent event) {

    // [ ----- BLOCKS ----- ]
    presentBlock = new PresentBlock(500).setUnlocalizedName("presentBlock");
    GameRegistry.registerBlock(presentBlock, "presentBlock");
    LanguageRegistry.addName(presentBlock, "Present");

    // [ ----- ITEMS ----- ]
    ChristmasItems.loadItems();

    LanguageRegistry.instance().addStringLocalization("itemGroup.ChristmasCraft", "ChristmasCraft");
    ChristmasRecipes.loadRecipies();
  }
  private void initFoods() {
    FrenchFries =
        (new BlazeItemFoods(DefaultProps.FRENCH_FRIES_ID, 5, 2.0F, false))
            .setPotionEffect(Potion.fireResistance.id, 60, 1, 1.0F)
            .setIconCoord(0, 1)
            .setItemName("frenchFries");

    LanguageRegistry.addName(FrenchFries, DefaultNames.EN.FRENCH_FRIES);
    LanguageRegistry.instance()
        .addNameForObject(FrenchFries, "ja_JP", DefaultNames.JP.FRENCH_FRIES);

    GameRegistry.addRecipe(
        new ItemStack(FrenchFries, 2), new Object[] {"XXX", Character.valueOf('X'), Item.blazeRod});
  }
  @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);
  }
  public static void registerBlocks() {
    swordStoneInactive = new BlockSwordStoneInactive(Reference.swordStoneInactive);
    swordStoneActive = new BlockSwordStoneActive(Reference.swordStoneActive);
    swordStoneVulcansRevenge =
        new BlockSwordStoneVulcansRevenge(Reference.swordStoneVulcansRevenge);

    GameRegistry.registerBlock(swordStoneInactive, "swordStoneInactive");
    GameRegistry.registerBlock(swordStoneActive, "swordStoneActive");
    GameRegistry.registerBlock(swordStoneVulcansRevenge, "swordStoneVulcansRevenge");

    LanguageRegistry.addName(swordStoneInactive, "Sword Stone");
    LanguageRegistry.addName(swordStoneActive, "Sword Stone Active");
    LanguageRegistry.addName(swordStoneVulcansRevenge, "Sword Stone Vulcans Revenge");
  }
  public static void register(int itemId) {
    int index = BoosterUnit.proxy.addNewArmourRendererPrefix("advancedBoosterUnit");
    instance = new ItemAdvancedBoosterUnit(itemId, index);

    GameRegistry.registerItem(instance, Const.Item.ItemName.ADVANCED_BOOSTER_UNIT);
    LanguageRegistry.addName(instance, "Advanced Booster Unit");
  }
Beispiel #17
0
  public static void load() {

    shaft = new BlockShaft(230);

    GameRegistry.registerBlock(shaft, "Gear Shaft");
    LanguageRegistry.addName(shaft, "Gear Shaft");
  }
Beispiel #18
0
 public <BLOCK extends Block> BLOCK newBlock(
     String name, Class<BLOCK> cls, Class itemClass, String title) {
   try {
     int id = config.getBlock(name, 4095).getInt();
     Constructor<BLOCK> ctor = cls.getConstructor(int.class);
     BLOCK block = ctor.newInstance(id);
     String qualName = assetKey + ":" + name;
     block.setUnlocalizedName(qualName);
     // block.func_111022_d(qualName.toLowerCase()); // Set default icon name
     // block.func_111022_d(qualName); // Set default icon name
     block.setTextureName(qualName); // Set default icon name
     GameRegistry.registerBlock(block, itemClass);
     if (title != null) {
       LanguageRegistry.addName(block, title);
       if (clientSide) {
         // System.out.printf("%s: BaseMod.newBlock: %s: creative tab = %s\n",
         //	this, block.getUnlocalizedName(), block.getCreativeTabToDisplayOn());
         if (block.getCreativeTabToDisplayOn() == null && !title.startsWith("["))
           block.setCreativeTab(CreativeTabs.tabMisc);
       }
     }
     if (block instanceof IBlock) registeredBlocks.add((IBlock) block);
     return block;
   } catch (Exception e) {
     throw new RuntimeException(e);
   }
 }
Beispiel #19
0
  @PreInit
  public void preInit(FMLPreInitializationEvent evt) {
    PHArmory.initProps();
    toolrack = new DisplayBlock(PHArmory.toolrack, Material.rock);
    GameRegistry.registerBlock(toolrack, tinker.armory.content.ToolrackItem.class, "ToolRack");
    GameRegistry.registerTileEntity(tinker.armory.content.ShieldrackLogic.class, "Display");
    shelf = new Shelf(PHArmory.shieldrack, Material.rock);
    GameRegistry.registerBlock(shelf, tinker.armory.content.ToolrackItem.class, "Shelf");
    GameRegistry.registerTileEntity(tinker.armory.content.ToolrackLogic.class, "aShelf");
    /*armorStand = new ArmorStand(1501, Material.rock);
    GameRegistry.registerBlock(armorStand, mDiyo.inficraft.armory.ArmorStandItem.class);
    GameRegistry.registerTileEntity(mDiyo.inficraft.armory.ArmorStandLogic.class, "InfiArmorStand");*/

    armorStandItem = new ArmorStandItem(PHArmory.armorItem).setItemName("armorstand");
    LanguageRegistry.instance().addName(armorStandItem, "Armor Stand");

    EntityRegistry.registerModEntity(
        tinker.armory.content.ArmorStandEntity.class, "Armor Stand", 0, this, 32, 5, true);
    NetworkRegistry.instance().registerGuiHandler(instance, new ArmoryGuiHandler());

    GameRegistry.addRecipe(
        new ItemStack(Armory.instance.armorStandItem, 1, 0),
        " c ",
        "csc",
        " b ",
        's',
        Item.stick,
        'c',
        Block.cobblestone,
        'b',
        Block.stoneSingleSlab);
  }
Beispiel #20
0
  /**
   * Called a bit later on during initialization to finish loading mods Also initializes key
   * bindings
   */
  @SuppressWarnings("deprecation")
  public void finishMinecraftLoading() {
    if (modsMissing != null
        || wrongMC != null
        || customError != null
        || dupesFound != null
        || modSorting != null) {
      return;
    }
    try {
      Loader.instance().initializeMods();
    } catch (CustomModLoadingErrorDisplayException custom) {
      FMLLog.log(
          Level.SEVERE, custom, "A custom exception was thrown by a mod, the game will now halt");
      customError = custom;
      return;
    } catch (LoaderException le) {
      haltGame(
          "There was a severe problem during mod loading that has caused the game to fail", le);
      return;
    }
    LanguageRegistry.reloadLanguageTable();
    RenderingRegistry.instance()
        .loadEntityRenderers(
            (Map<Class<? extends Entity>, Render>) RenderManager.field_78727_a.field_78729_o);

    loading = false;
    KeyBindingRegistry.instance().uploadKeyBindingsToGame(client.field_71474_y);
  }
Beispiel #21
0
 @EventHandler
 public void load(FMLInitializationEvent event) {
   // Register events
   NetworkRegistry.instance().registerGuiHandler(instance, proxy);
   LanguageRegistry.instance().addStringLocalization("itemGroup.Particular", "Particular");
   GameRegistry.registerWorldGenerator(eventmanager);
 }
 public ItemPowerArmorLeggings() {
   super(
       assignedItemID, // itemID
       0, // Texture index for rendering armor on the player
       2); // armor type. 0=head, 1=torso, 2=legs, 3=feet
   LanguageRegistry.addName(this, "Power Armor Leggings");
 }
 @Override
 public void initLangNames() {
   for (BoatType boat : BoatType.values()) {
     LanguageRegistry.instance()
         .addStringLocalization("item." + boat.unloc + ".chest.name", boat.loc + " with Chest");
   }
 }
  public static void init() {
    frad = new ItemFrad(ItemIds.FRAD);
    CeramicClay = new ItemCeramicPaste(ItemIds.CERAMICCLAY);
    QuickSilverBucket =
        new ItemBucket(ItemIds.QUICKSILVERBUCKET, BlockIds.QUICKSILVERSTILL)
            .setUnlocalizedName("bucketQuicksilver")
            .setContainerItem(Item.bucketEmpty);

    GameRegistry.registerItem(frad, Strings.FRAD_NAME);
    GameRegistry.registerItem(CeramicClay, Strings.CERAMICCLAY_NAME);
    GameRegistry.registerItem(QuickSilverBucket, Strings.QUICKSILVERBUCKET_NAME);

    LanguageRegistry.addName(frad, "F.R.A.D.");
    LanguageRegistry.addName(CeramicClay, "Ceramic Clay");
    LanguageRegistry.addName(QuickSilverBucket, "Quicksilver Bucket");
  }
Beispiel #25
0
 /** {@inheritDoc} */
 @Init
 public void load(final FMLInitializationEvent event) {
   klaxon = new ItemKlaxon(klaxonId);
   LanguageRegistry.addName(klaxon, "Klaxon");
   GameRegistry.addRecipe(
       new ItemStack(klaxon),
       " x ",
       "xox",
       " x ",
       'x',
       new ItemStack(Item.stick),
       'o',
       new ItemStack(Item.leather));
   if (event.getSide() == Side.CLIENT) {
     String name = "klaxon" + Minecraft.getMinecraft().session.username;
     Minecraft.getMinecraft().sndManager.addSound(name + ".ogg", file);
     FMLLog.log(MOD_ID, Level.INFO, "klaxon name %s", name);
   }
   // Adds listeners.
   if (event.getSide() == Side.CLIENT) {
     providerListener = new MyProviderListener();
     fileListener = new MyFileListener();
     IProvider p = P2P.get(P2P.CLIENT_PROVIDER);
     p.addListener(providerListener);
     p.getFileProvider().addListener(fileListener);
   }
 }
  /** Registers Entities */
  public void registerEntities() {
    EntityRegistry.registerModEntity(
        EntityParadoxHunter.class, "ParadoxHunter", 1, this, 80, 1, true);
    EntityRegistry.registerModEntity(EntityPlayerPast.class, "PastPlayer", 2, this, 80, 1, true);
    EntityRegistry.addSpawn(
        EntityParadoxHunter.class,
        10,
        2,
        4,
        EnumCreatureType.creature,
        BiomeGenBase.beach,
        BiomeGenBase.extremeHills,
        BiomeGenBase.extremeHillsEdge,
        BiomeGenBase.forest,
        BiomeGenBase.forestHills,
        BiomeGenBase.jungle,
        BiomeGenBase.jungleHills,
        BiomeGenBase.mushroomIsland,
        BiomeGenBase.mushroomIslandShore,
        BiomeGenBase.ocean,
        BiomeGenBase.plains,
        BiomeGenBase.river,
        BiomeGenBase.swampland);
    LanguageRegistry.instance()
        .addStringLocalization("entity.Charsmud_TimeTraveler.ParadoxHunter.name", "Paradox Hunter");

    registerEntityEgg(EntityParadoxHunter.class, 0xffffff, 0x000000);
  }
Beispiel #27
0
  /** * Loads in all the localization files from the Localizations library class */
  public static void loadConfig() {
    config = new TagFile();
    InputStream var0 =
        Harmonion.class.getResourceAsStream("/net/Harmonion/client/lang/default.cfg");
    config.readStream(var0);
    File var1;

    if (configDir == null) {
      var1 = Loader.instance().getConfigDir();
      var1 = new File(var1, "/Harmonion/");
      var1.mkdir();
      configDir = var1;
      configFile = new File(var1, "Harmonion.cfg");
    }

    if (configFile.exists()) {
      config.readFile(configFile);
    }

    config.commentFile("Harmonion Configuration");
    String var2;
    Iterator var4;

    for (var4 = config.query("blocks.%.%.id").iterator();
        var4.hasNext();
        reservedIds[config.getInt(var2)] = true) {
      var2 = (String) var4.next();
    }

    for (var4 = config.query("items.%.%.id").iterator();
        var4.hasNext();
        reservedIds[config.getInt(var2) + 256] = true) {
      var2 = (String) var4.next();
    }

    if (hmcTranslateTable == null) {
      hmcTranslateTable = new Properties();
    }

    try {
      hmcTranslateTable.load(
          Harmonion.class.getResourceAsStream("/net/Harmonion/client/lang/Harmonion.lang"));
      var1 = new File(configDir, "Harmonion.lang");

      if (var1.exists()) {
        FileInputStream var5 = new FileInputStream(var1);
        hmcTranslateTable.load(var5);
      }
    } catch (IOException var3) {
      var3.printStackTrace();
    }
    var4 = hmcTranslateTable.entrySet().iterator();

    while (var4.hasNext()) {
      Entry var6 = (Entry) var4.next();
      LanguageRegistry.instance()
          .addStringLocalization((String) var6.getKey(), (String) var6.getValue());
    }
  }
Beispiel #28
0
 public GunCusBlock(int par1, Material par2Material, String unlocalized, String name) {
   super(par1, par2Material);
   setUnlocalizedName(unlocalized);
   LanguageRegistry.addName(this, name);
   setCreativeTab(GunCus.gcTab);
   setHardness(2.0F);
   setResistance(5.0F);
 }
 protected void init() {
   LanguageRegistry.addName(this, ModObject.blockCapacitorBank.name);
   GameRegistry.registerBlock(
       this, BlockItemCapacitorBank.class, ModObject.blockCapacitorBank.unlocalisedName);
   GameRegistry.registerTileEntity(
       TileCapacitorBank.class, ModObject.blockCapacitorBank.unlocalisedName + "TileEntity");
   EnderIO.guiHandler.registerGuiHandler(GuiHandler.GUI_ID_CAPACITOR_BANK, this);
 }
 public static Block addBlock(String name, Block block) {
   // System.out.printf("%s: Adding block %s id %s\n", modName, name,
   // block.blockID);
   block.setUnlocalizedName("gcewing." + idToName.get(block.blockID));
   GameRegistry.registerBlock(block);
   LanguageRegistry.addName(block, name);
   return block;
 }