@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");
        }
    }
  }
예제 #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");
  }
  @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 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");
  }
예제 #5
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");
 }
예제 #6
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);
  }
예제 #7
0
  private void initBlazeArmor() {
    /**
     * CLOTH(5, new int[]{1, 3, 2, 1}, 15), CHAIN(15, new int[]{2, 5, 4, 1}, 12), IRON(15, new
     * int[]{2, 6, 5, 2}, 9), GOLD(7, new int[]{2, 5, 3, 1}, 25), DIAMOND(33, new int[]{3, 8, 6, 3},
     * 10);
     */
    BlazeArmorMaterial = EnumHelper.addArmorMaterial("blazeIngot", 33, new int[] {2, 6, 5, 2}, 9);

    BlazeHelmet =
        (new BlazeItemArmor(DefaultProps.BLAZE_HELMET_ID, BlazeArmorMaterial, 1, 0))
            .setIconCoord(7, 0)
            .setItemName("blazeHelmet");
    LanguageRegistry.addName(BlazeHelmet, DefaultNames.EN.BLAZE_HELMET);
    LanguageRegistry.instance()
        .addNameForObject(BlazeHelmet, "ja_JP", DefaultNames.JP.BLAZE_HELMET);
    GameRegistry.addRecipe(
        new ItemStack(BlazeHelmet, 1),
        new Object[] {"XXX", "X X", Character.valueOf('X'), BlazeIngot});

    BlazeChestPlate =
        (new BlazeItemArmor(DefaultProps.BLAZE_CHESTPLATE_ID, BlazeArmorMaterial, 1, 1))
            .setIconCoord(8, 0)
            .setItemName("blazeChestPlate");
    LanguageRegistry.addName(BlazeChestPlate, DefaultNames.EN.BLAZE_CHESTPLATE);
    LanguageRegistry.instance()
        .addNameForObject(BlazeChestPlate, "ja_JP", DefaultNames.JP.BLAZE_CHESTPLATE);
    GameRegistry.addRecipe(
        new ItemStack(BlazeChestPlate, 1),
        new Object[] {"X X", "XXX", "XXX", Character.valueOf('X'), BlazeIngot});

    BlazeLeggings =
        (new BlazeItemArmor(DefaultProps.BLAZE_LEGGINGS_ID, BlazeArmorMaterial, 1, 2))
            .setIconCoord(9, 0)
            .setItemName("blazeLeggings");
    LanguageRegistry.addName(BlazeLeggings, DefaultNames.EN.BLAZE_LEGGINGS);
    LanguageRegistry.instance()
        .addNameForObject(BlazeLeggings, "ja_JP", DefaultNames.JP.BLAZE_LEGGINGS);
    GameRegistry.addRecipe(
        new ItemStack(BlazeLeggings, 1),
        new Object[] {"XXX", "X X", "X X", Character.valueOf('X'), BlazeIngot});

    BlazeBoots =
        (new BlazeItemArmor(DefaultProps.BLAZE_BOOTS_ID, BlazeArmorMaterial, 1, 3))
            .setIconCoord(10, 0)
            .setItemName("blazeBoots");
    LanguageRegistry.addName(BlazeBoots, DefaultNames.EN.BLAZE_BOOTS);
    LanguageRegistry.instance().addNameForObject(BlazeBoots, "ja_JP", DefaultNames.JP.BLAZE_BOOTS);
    GameRegistry.addRecipe(
        new ItemStack(BlazeBoots, 1),
        new Object[] {"X X", "X X", Character.valueOf('X'), BlazeIngot});
  }
예제 #8
0
  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");
  }
예제 #9
0
  public static void load() {

    shaft = new BlockShaft(230);

    GameRegistry.registerBlock(shaft, "Gear Shaft");
    LanguageRegistry.addName(shaft, "Gear Shaft");
  }
 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");
 }
예제 #11
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);
   }
 }
  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");
  }
예제 #13
0
  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");
  }
예제 #14
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);
   }
 }
예제 #15
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);
 }
예제 #16
0
 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;
 }
예제 #17
0
  public static void register(int blockId) {
    instance = new BlockFuelReformer(blockId);
    GameRegistry.registerBlock(instance, Const.Block.BlockName.FUEL_REFORMER);
    LanguageRegistry.addName(instance, "Fuel Reformer");

    GameRegistry.registerTileEntity(
        TileEntityFuelReformer.class, TileEntityFuelReformer.class.getSimpleName());
  }
 public XPUpgradeItem(int id, int maxStackSize, CreativeTabs tab, int texture, String name) {
   super(id);
   setMaxStackSize(maxStackSize);
   setCreativeTab(tab);
   setIconIndex(texture);
   setItemName(name);
   LanguageRegistry.addName(this, name);
 }
예제 #19
0
 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);
 }
예제 #20
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);
  }
예제 #22
0
  @Init
  public void load(FMLInitializationEvent event) {
    proxy.registerRenderThings();
    GameRegistry.registerBlock(coloredOre, "BlockColoredOre.class");
    GameRegistry.registerWorldGenerator(worldGen);

    for (int i = 0; i < coloredOreNames.length; i++) {
      ItemStack multiBlockStack = new ItemStack(coloredOre, 1, i);
      LanguageRegistry.addName(multiBlockStack, coloredOreNames[i]);
    }
  }
예제 #23
0
  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});
  }
예제 #24
0
 public void init() {
   // This is required so it is assigned prior to the BlockItem being
   // registered.
   if (isDouble) {
     LanguageRegistry.addName(this, ModObject.blockCustomDoubleSlab.name);
     GameRegistry.registerBlock(
         this, BlockItemCustomSlab.class, ModObject.blockCustomDoubleSlab.unlocalisedName);
     GameRegistry.registerTileEntity(
         TileEntityCustomSlab.class,
         ModObject.blockCustomDoubleSlab.unlocalisedName + "TileEntity");
   } else {
     LanguageRegistry.addName(this, ModObject.blockCustomSlab.name);
     GameRegistry.registerBlock(
         this, BlockItemCustomSlab.class, ModObject.blockCustomSlab.unlocalisedName);
     GameRegistry.registerTileEntity(
         TileEntityCustomBlock.class, ModObject.blockCustomSlab.unlocalisedName + "TileEntity");
     MachineRecipeRegistry.instance.registerRecipe(
         ModObject.blockPainter.unlocalisedName, new PainterTemplate());
   }
 }
예제 #25
0
  protected BlockREbench(boolean active) {
    super(REbenchId, Material.iron);
    this.isActive = active;
    this.textureFile = DefaultProps.TEXTURE_BLOCKS;
    this.GUID = DefaultProps.RE_BENCH_GUID;

    setHardness(5F);
    setCreativeTab(CreativeTabs.tabDecorations);
    setBlockName(DefaultProps.RE_BENCH_NAME);

    LanguageRegistry.addName(this, DefaultProps.RE_BENCH_FULLNAME);
  }
  @Init
  public void init(FMLInitializationEvent event) {
    /*
     * Register blocks to forge
     */
    LanguageRegistry.addName(blockDetector, "Detector");
    MinecraftForge.setBlockHarvestLevel(blockDetector, "pickaxe", 3);
    GameRegistry.registerBlock(blockDetector, "Detector");
    GameRegistry.registerTileEntity(TileDetector.class, "containerDetector");

    NetworkRegistry.instance().registerGuiHandler(this, new GuiHandler());
  }
예제 #27
0
  public void addNames() {
    LanguageRegistry.addName(BioFuel, "Bio Fuel");
    LanguageRegistry.addName(ElectrolyticCore, "Electrolytic Core");
    LanguageRegistry.addName(SolarPanel, "Solar Panel");

    // Localization for Generator
    LanguageRegistry.instance()
        .addStringLocalization("tile.Generator.HeatGenerator.name", "Heat Generator");
    LanguageRegistry.instance()
        .addStringLocalization("tile.Generator.SolarGenerator.name", "Solar Generator");
    LanguageRegistry.instance()
        .addStringLocalization(
            "tile.Generator.ElectrolyticSeparator.name", "Electrolytic Separator");
    LanguageRegistry.instance()
        .addStringLocalization("tile.Generator.HydrogenGenerator.name", "Hydrogen Generator");
    LanguageRegistry.instance()
        .addStringLocalization("tile.Generator.BioGenerator.name", "Bio-Generator");
    LanguageRegistry.instance()
        .addStringLocalization(
            "tile.Generator.AdvancedSolarGenerator.name", "Advanced Solar Generator");
  }
예제 #28
0
 public static void registerItems(Object[] configs) {
   // ID
   int id1 = Integer.parseInt(configs[1].toString());
   int id2 = Integer.parseInt(configs[2].toString());
   int id3 = Integer.parseInt(configs[3].toString());
   if (Config.toBoolean(configs[102].toString())) {
     // Asphaltator
     asphaltator = new ItemAsphaltator(id3).setItemName("Asphaltator");
     GameRegistry.registerItem(asphaltator, "Asphaltator");
     LanguageRegistry.addName(asphaltator, "Asphaltator");
   }
 }
예제 #29
0
 public Sword(int i, String name, EnumToolMaterial equiv) {
   id = i;
   swordName = name;
   material = equiv;
   theSword =
       (okushama.humansplus.Sword)
           (new okushama.humansplus.Sword(id, material)
               .setIconCoord(id - 846, 0)
               .setItemName(swordName)
               .setCreativeTab(CreativeTabs.tabCombat));
   LanguageRegistry.addName(theSword, swordName);
 }
예제 #30
0
  @Init
  public void init(FMLInitializationEvent event) {
    colorBrickBlock = (new BlockColorBrick(colorBrickBlockID, 0)).setBlockName("colorBrickBlock");

    LanguageRegistry.addName(colorBrickBlock, "ColorBrick");

    GameRegistry.registerBlock(colorBrickBlock);

    MinecraftForgeClient.preloadTexture("/SC/terrain.png");

    MinecraftForgeClient.preloadTexture("/SC/items.png");
  }