private static void registerArtifacts() {
   GameRegistry.registerItem(anachDoodad, Names.ANACH_DOODAD);
   GameRegistry.registerItem(mustyJournal, Names.MUSTY_JOURNAL);
   GameRegistry.registerItem(perGuiVox, Names.PER_GUI_VOX);
   GameRegistry.registerItem(plotoniumScrap, Names.PLOTONIUM_SCRAP);
   GameRegistry.registerItem(voxBox, Names.VOX_BOX);
 }
 public CookingPlusHeartCutter() {
   GameRegistry.registerItem(this, name);
   setUnlocalizedName("heartcutter");
   setCreativeTab(CreativeTabs.tabMisc);
   // setTextureName(CookingPlusMain.MODID + ":dough");
   setMaxStackSize(1);
 }
 public ItemTrolldenApple() {
   super(-4, -9.6F, false);
   this.setAlwaysEdible();
   setCreativeTab(DerpMod.tabDerpMod);
   setUnlocalizedName(DerpMod.MODID + "_" + name);
   GameRegistry.registerItem(this, name);
 }
  private static void registerTools() {
    GameRegistry.registerItem(shovelBronze, shovelBronze.getUndecoratedName());
    GameRegistry.registerItem(pickBronze, pickBronze.getUndecoratedName());
    GameRegistry.registerItem(axeBronze, axeBronze.getUndecoratedName());
    GameRegistry.registerItem(hoeBronze, hoeBronze.getUndecoratedName());

    GameRegistry.registerItem(buildToolForm, buildToolForm.getUndecoratedName() + "_form");

    GameRegistry.registerItem(shovelSteel, shovelSteel.getUndecoratedName());
    GameRegistry.registerItem(pickSteel, pickSteel.getUndecoratedName());
    GameRegistry.registerItem(axeSteel, axeSteel.getUndecoratedName());
    GameRegistry.registerItem(hoeSteel, hoeSteel.getUndecoratedName());
  }
 public BasicMoment() {
   this.setMaxStackSize(64);
   this.setRegistryName("basicmoment");
   GameRegistry.registerItem(this, "b");
   this.setUnlocalizedName("parachronology:basicmoment");
   this.setHasSubtypes(false);
   this.setMaxDamage(0);
 }
Exemple #6
0
  public void register() {
    MinecraftForge.EVENT_BUS.register(this);

    GameRegistry.registerItem(itemTest, "itemTest");
    Minecraft.getMinecraft()
        .getRenderItem()
        .getItemModelMesher()
        .register(itemTest, 0, new ModelResourceLocation("airix:itemTest", "inventory"));
  }
  private static void registerArmor() {
    GameRegistry.registerItem(helmetBronze, helmetBronze.getUndecoratedName());
    GameRegistry.registerItem(chestplateBronze, chestplateBronze.getUndecoratedName());
    GameRegistry.registerItem(leggingsBronze, leggingsBronze.getUndecoratedName());
    GameRegistry.registerItem(bootsBronze, bootsBronze.getUndecoratedName());

    GameRegistry.registerItem(helmetSteel, helmetSteel.getUndecoratedName());
    GameRegistry.registerItem(chestplateSteel, chestplateSteel.getUndecoratedName());
    GameRegistry.registerItem(leggingsSteel, leggingsSteel.getUndecoratedName());
    GameRegistry.registerItem(bootsSteel, bootsSteel.getUndecoratedName());
  }
Exemple #8
0
  @EventHandler
  public static void preinit(FMLPreInitializationEvent PreEvent) {
    // Enum Item ToolMaterials
    ToolMaterial copper = EnumHelper.addToolMaterial("copper", 2, 320, 5.5F, 2.5F, 16);

    // Blocks
    copperOre = new CopperOre();

    // Blocks Language Registry
    LanguageRegistry.addName(copperOre, "Copper Ore");

    // Tools
    copperAxe = new CopperAxe(copper);
    copperPickaxe = new CopperPickaxe(copper);
    copperSpade = new CopperSpade(copper);
    copperSword = new CopperSword(copper);
    copperHoe = new CopperHoe(copper);

    GameRegistry.registerItem(copperAxe = new CopperAxe(copper), "copperAxe");
    GameRegistry.registerItem(copperPickaxe = new CopperPickaxe(copper), "copperPickaxe");
    GameRegistry.registerItem(copperSpade = new CopperSpade(copper), "copperSpade");
    GameRegistry.registerItem(copperSword = new CopperSword(copper), "copperSword");
    GameRegistry.registerItem(copperHoe = new CopperHoe(copper), "copperHoe");

    // Tools Language Registry
    LanguageRegistry.addName(copperAxe, "Copper Axe");
    LanguageRegistry.addName(copperPickaxe, "Copper Pickaxe");
    LanguageRegistry.addName(copperSpade, "Copper Shovel");
    LanguageRegistry.addName(copperHoe, "Copper Hoe");
    LanguageRegistry.addName(copperSword, "Copper Sword");

    // Items
    copperIngot = new CopperIngot();

    // Items Language Registry
    LanguageRegistry.addName(copperIngot, "Copper Ingot");

    // Recipes
    ModRecipes.addRecipes();

    // Event Handler Registry
    proxy.registerRenderInfo();
  }
  private void register() {
    this.setUnlocalizedName(ModUtil.MOD_ID_LOWER + "." + this.getBaseName());
    GameRegistry.registerItem(this, this.getBaseName());
    if (this.shouldAddCreative()) {
      this.setCreativeTab(CreativeTab.instance);
    } else {
      this.setCreativeTab(null);
    }

    this.registerRendering();
  }
Exemple #10
0
  public static void preInitCommon() {
    // each instance of your block should have a name that is unique within your mod.  use lower
    // case.
    // you don't need to register an item corresponding to the block, GameRegistry.registerBlock
    // does this automatically.
    nodarmor_helmet =
        (NodArmor) (new NodArmor(NODARMOR, 1, 0).setUnlocalizedName(NodArmor.unl_name + "_helmet"));
    nodarmor_chestplate =
        (NodArmor)
            (new NodArmor(NODARMOR, 1, 1).setUnlocalizedName(NodArmor.unl_name + "_chestplate"));
    nodarmor_leggings =
        (NodArmor)
            (new NodArmor(NODARMOR, 2, 2).setUnlocalizedName(NodArmor.unl_name + "_leggings"));
    nodarmor_boots =
        (NodArmor) (new NodArmor(NODARMOR, 1, 3).setUnlocalizedName(NodArmor.unl_name + "_boots"));

    GameRegistry.registerItem(nodarmor_helmet, NodArmor.unl_name + "_helmet");
    GameRegistry.registerItem(nodarmor_chestplate, NodArmor.unl_name + "_chestplate");
    GameRegistry.registerItem(nodarmor_leggings, NodArmor.unl_name + "_leggings");
    GameRegistry.registerItem(nodarmor_boots, NodArmor.unl_name + "_boots");
  }
Exemple #11
0
  {
    // Blocks
    // oreRuby = new OreRuby();
    // oreTitanium = new OreTitanium();
    // GameRegistry.registerBlock(oreRuby, "oreRuby");
    // GameRegistry.registerBlock(oreTitanium, "oreTitanium");

    // Items
    ingotRubium = new IngotRubium();
    gemRuby = new GemRuby();
    ingotTitanium = new IngotTitanium();
    GameRegistry.registerItem(gemRuby, "gemRuby");
    GameRegistry.registerItem(ingotTitanium, "ingotTitanium");
    GameRegistry.registerItem(ingotRubium, "ingotRubium");
    LanguageRegistry.addName(ingotRubium, "Rubium Ingot");
    LanguageRegistry.addName(gemRuby, "Ruby Gem");
    LanguageRegistry.addName(ingotTitanium, "Titanium Ingot");

    // Crafting
    GameRegistry.addShapelessRecipe(
        new ItemStack(ingotRubium), new Object[] {new ItemStack(gemRuby), ingotTitanium});
  }
  /**
   * Registers a valid dust into the RunesOfWizardry system. MUST EXTEND IDUST!! <br>
   * Note: also registers it as an Item in the GameRegistry, sets up its unlocalized name and
   * creative tab.
   */
  public static void registerDust(final IDust dustclass) {
    // add it to our list of dusts
    dusts.add(dustclass);

    dustclass.setUnlocalizedName(dustclass.getmodid() + "_" + dustclass.getName());
    dustclass.setCreativeTab(dustclass.creativeTab());

    GameRegistry.registerItem(dustclass, dustclass.getName());

    // list of subItems
    List<ItemStack> subDusts = new ArrayList<ItemStack>(15);
    // get the subDusts. hopefully, tabAllSearch is the right one
    dustclass.getSubItems(dustclass, CreativeTabs.tabAllSearch, subDusts);

    // create the block form of the dust
    if (!dustclass.hasCustomBlock()) {
      Block dustBlock =
          new IDustStorageBlock(Material.sand) {

            @Override
            public IDust getIDust() {
              return dustclass;
            }
          };

      // Crafting
      // hopefully this is enough for metadata
      for (ItemStack i : subDusts) {
        GameRegistry.addShapedRecipe(
            new ItemStack(dustBlock, 1, i.getItemDamage()),
            new Object[] {"XXX", "XXX", "XXX", 'X', i});
        GameRegistry.addShapelessRecipe(i, new ItemStack(dustBlock, 1, i.getItemDamage()));
      }
    }

    // register the recipes for this dust
    // TODO use a custom RecipeHandler
    for (ItemStack i : subDusts) {
      ItemStack[] items = dustclass.getInfusionItems(i);
      if (items != null) {
        recipes.put(items, i);
      }
    }
  }
  public static void preInitCommon() {

    //   Because the CreativeTabs class only has one abstract method, we can easily use an anonymous
    // class.
    //   For more information about anonymous classes, see this link:
    //   http://docs.oracle.com/javase/tutorial/java/javaOO/anonymousclasses.html
    //   To set the actual name of the tab, you have to go into your .lang file and add the line
    //    itemGroup.mbe08_creative_tab=Gold Nugget Tab
    //   where gold_nugget_tab is the unlocalized name of your creative tab, and Gold Nugget Tab
    //   is the actual name of your tab
    /*
     * Note that there is no need to explicitly register the creative tabs themselves. When
     * you make a new CreativeTabs object, it gets added automatically in the constructor of
     * the CreativeTabs class.
     */
    customTab =
        new CreativeTabs("mbe08_creative_tab") {
          @Override
          @SideOnly(Side.CLIENT)
          public Item getTabIconItem() {
            return Items.gold_nugget;
          }
        };

    //  The lines below create a test block and item instance that are going to be added to the
    // creative tabs.
    //  An item can be listed on multiple tabs by overriding Item.getCreativeTabs()
    //  A block can only be listed on one tab, unless you give it a custom ItemBlock which overrides
    // .getCreativeTabs()
    testBlock =
        new BlockHardenedClay()
            .setUnlocalizedName("mbe08_creative_tab_block")
            .setCreativeTab(customTab);
    testItem =
        new ItemSword(Item.ToolMaterial.GOLD)
            .setUnlocalizedName("mbe08_creative_tab_item")
            .setCreativeTab(customTab);
    GameRegistry.registerBlock(testBlock, "mbe08_creative_tab_block");
    GameRegistry.registerItem(testItem, "mbe08_creative_tab_item");

    allMbeItemsTab = new AllMbeItemsTab("mbe08_creative_tab_all_MBE");
  }
 @Override
 public void registerFood(ItemTMFFood foodItem) {
   GameRegistry.registerItem(foodItem, foodItem.getUnlocalizedName().substring(5));
 }
 public BaconsteelShovel() {
   super(ModItems.baconsteel);
   GameRegistry.registerItem(this, "gourmancy" + ":" + name);
   setUnlocalizedName("gourmancy" + ":" + name);
   setCreativeTab(GourmancyCreativeTab.INSTANCE);
 }
Exemple #16
0
 public static void register() {
   GameRegistry.registerItem(titanium_ingot, titanium_ingot.getUnlocalizedName().substring(5));
 }
 public ItemBasicCircuit() {
   super();
   setUnlocalizedName("itemBasicCircuit");
   setRegistryName("itemBasicCircuit");
   GameRegistry.registerItem(this);
 }
Exemple #18
0
 public static void preInitCommon() {
   // each instance of your item should have a name that is unique within your mod.  use lower
   // case.
   ironDust = new IronDust().setUnlocalizedName("irondust");
   GameRegistry.registerItem(ironDust, "irondust");
 }
Exemple #19
0
 public static void preInit(FMLPreInitializationEvent event) {
   GameRegistry.registerItem(itemBatEar, "itemBatEar");
 }
 private static void registerItemAndOre(Item item, String name) {
   GameRegistry.registerItem(item, name);
   OreDictionary.registerOre(name, item);
 }
 private static void registerWeapons() {
   GameRegistry.registerItem(swordBronze, swordBronze.getUndecoratedName());
   GameRegistry.registerItem(swordSteel, swordSteel.getUndecoratedName());
 }
 public CookingPlusCocoaPowder() {
   super();
   GameRegistry.registerItem(this, name);
   setUnlocalizedName("cocoapowder");
 }
  /**
   * Imports resources using the metadata from a resource pack.
   *
   * @param manager - the resource manager to use
   * @param data - the metadata that contains the resource names
   */
  private void importResources(IResourceManager manager, ModbuilderResource data) {
    ResourceDeserializer deserializer = new ResourceDeserializer();
    GsonBuilder builder = new GsonBuilder();
    builder.registerTypeAdapter(BaseItemResource.class, deserializer);
    builder.registerTypeAdapter(BaseBlockResource.class, deserializer);
    builder.registerTypeAdapter(BaseStructureResource.class, deserializer);
    builder.registerTypeAdapter(BaseRecipe.class, deserializer);
    Gson gson = builder.create();

    Map<String, BaseBlockResource> blockResources = new HashMap<String, BaseBlockResource>();
    Map<String, BaseItemResource> itemResources = new HashMap<String, BaseItemResource>();
    for (String path : data.blocks) {
      try {
        ResourceLocation location =
            new ResourceLocation(BuilderMod.MODID + ":blocks/" + path + ".json");
        IResource resource = manager.getResource(location);
        BaseBlockResource blockResource =
            gson.fromJson(
                new InputStreamReader(resource.getInputStream()), BaseBlockResource.class);
        Block block = ResourceConverter.toEmptyBlock(blockResource);
        block.setUnlocalizedName(BuilderMod.MODID + "_" + path);
        if (!registeredBlocks.contains(path)) {
          registeredBlocks.add(path);
          blockModels.put(block, blockResource.model);
          customBlocks.put(path, block);
          blockResources.put(path, blockResource);
        }
      } catch (IOException e) {
        // ignore
      }
    }

    for (String path : data.items) {
      try {
        ResourceLocation location =
            new ResourceLocation(BuilderMod.MODID + ":items/" + path + ".json");
        IResource resource = manager.getResource(location);
        BaseItemResource itemResource =
            gson.fromJson(new InputStreamReader(resource.getInputStream()), BaseItemResource.class);
        Item item = ResourceConverter.toEmptyItem(itemResource);
        item.setUnlocalizedName(BuilderMod.MODID + "_" + path);
        if (!registeredItems.contains(path)) {
          registeredItems.add(path);
          itemModels.put(item, itemResource.model);
          customItems.put(path, item);
          itemResources.put(path, itemResource);
        }
      } catch (IOException e) {
        // ignore
      }
    }

    for (String path : blockResources.keySet()) {
      BaseBlockResource resource = blockResources.get(path);
      Block block = ResourceConverter.toBlock(customBlocks.get(path), resource);
      GameRegistry.registerBlock(block, path);
      if (resource.burntime != null) fuels.put(Item.getItemFromBlock(block), resource.burntime);
    }

    for (String path : itemResources.keySet()) {
      BaseItemResource resource = itemResources.get(path);
      Item item = ResourceConverter.toItem(customItems.get(path), resource);
      GameRegistry.registerItem(item, path);
      if (resource.burntime != null) fuels.put(item, resource.burntime);
    }

    for (String path : data.structures) {
      try {
        ResourceLocation location =
            new ResourceLocation(BuilderMod.MODID + ":structures/" + path + ".json");
        IResource resource = manager.getResource(location);
        BaseStructureResource structureResource =
            gson.fromJson(
                new InputStreamReader(resource.getInputStream()), BaseStructureResource.class);
        BuilderStruct structure = ResourceConverter.toStructure(structureResource);
        if (!registeredStructures.contains(path)) {
          registeredStructures.add(path);
          registry.structs.add(structure);
        }
      } catch (IOException e) {
        // ignore
      }
    }

    for (String path : data.recipes) {
      try {
        ResourceLocation location =
            new ResourceLocation(BuilderMod.MODID + ":recipes/" + path + ".json");
        String s = location.getResourcePath();
        IResource resource = manager.getResource(location);
        BaseRecipe recipe =
            gson.fromJson(new InputStreamReader(resource.getInputStream()), BaseRecipe.class);
        RecipeRegistry.register(recipe);
      } catch (IOException e) {
        // ignore
      }
    }
  }