MFF

    Minecraft Forge France
    • Récent
    • Mots-clés
    • Populaire
    • Utilisateurs
    • Groupes
    • Forge Events
      • Automatique
      • Foncé
      • Clair
    • S'inscrire
    • Se connecter

    [CreativeTab]

    Planifier Épinglé Verrouillé Déplacé Résolu 1.7.x
    1.7.10
    14 Messages 2 Publieurs 2.5k Vues 1 Abonné
    Charger plus de messages
    • Du plus ancien au plus récent
    • Du plus récent au plus ancien
    • Les plus votés
    Répondre
    • Répondre à l'aide d'un nouveau sujet
    Se connecter pour répondre
    Ce sujet a été supprimé. Seuls les utilisateurs avec les droits d'administration peuvent le voir.
    • SpyManS Hors-ligne
      SpyMan
      dernière édition par

      Quand j’ai ajouté cette fonction le Tab ne fonctionnait déjà pas. Y-a-t-il un GameRegistry pour les tabs ? ou autre chose? :huh:

      1 réponse Dernière réponse Répondre Citer 0
      • robin4002R Hors-ligne
        robin4002 Moddeurs confirmés Rédacteurs Administrateurs
        dernière édition par

        Non, il n’y a pas besoin de l’enregistrer.

        L’onglet est vide ou il est juste pas présent ?

        1 réponse Dernière réponse Répondre Citer 0
        • SpyManS Hors-ligne
          SpyMan
          dernière édition par

          Il est vide, j’ai beau mettre des  items/blocs dedans avec setCreativeTab mais çà ne marche pas.

          1 réponse Dernière réponse Répondre Citer 0
          • robin4002R Hors-ligne
            robin4002 Moddeurs confirmés Rédacteurs Administrateurs
            dernière édition par

            Tes items sont bien présent en jeu ?

            Peux-tu envoyé ta classe principale complète ?

            1 réponse Dernière réponse Répondre Citer 0
            • SpyManS Hors-ligne
              SpyMan
              dernière édition par

              Oui, mes items sont présents dans le jeu

              ​package com.google.SpyMan.Mechanicalcraft.common;
              
              import java.util.ArrayList;
              import java.util.List;
              
              import net.minecraft.creativetab.CreativeTabs;
              import net.minecraft.init.Blocks;
              import net.minecraft.init.Items;
              import net.minecraft.item.Item;
              import net.minecraft.item.Item.ToolMaterial;
              import net.minecraft.item.ItemAxe;
              import net.minecraft.item.ItemHoe;
              import net.minecraft.item.ItemPickaxe;
              import net.minecraft.item.ItemSpade;
              import net.minecraft.item.ItemStack;
              import net.minecraft.item.ItemSword;
              import net.minecraft.item.ItemTool;
              import net.minecraft.block.Block;
              import net.minecraft.block.material.Material;
              import net.minecraftforge.common.util.EnumHelper;
              import net.minecraftforge.oredict.OreDictionary;
              
              import com.google.SpyMan.Mechanicalcraft.proxy.ClientProxy;
              import com.google.SpyMan.Mechanicalcraft.proxy.CommonProxy;
              
              import cpw.mods.fml.common.FMLCommonHandler;
              import cpw.mods.fml.common.Mod;
              import cpw.mods.fml.common.Mod.EventHandler;
              import cpw.mods.fml.common.Mod.Instance;
              import cpw.mods.fml.common.SidedProxy;
              import cpw.mods.fml.common.event.FMLInitializationEvent;
              import cpw.mods.fml.common.event.FMLPostInitializationEvent;
              import cpw.mods.fml.common.event.FMLPreInitializationEvent;
              import cpw.mods.fml.common.registry.GameRegistry;
              
              @Mod(modid = "modmechanicalcraft", name = "MechanicalCraft_beta", version = "1.0.0")
              public class mod_mechanicalcraft {
              
              @Instance("modmechanicalcraft")
              public static mod_mechanicalcraft instance;
              
              @SidedProxy(clientSide = "com.google.SpyMan.Mechanicalcraft.proxy.ClientProxy", serverSide = "com.google.SpyMan.Mechanicalcraft.proxy.CommonProxy")
              public static CommonProxy proxy;
              
              // Item –---------------------------------------------
              
              public static Item Wrench, Hammer, Pliers;
              public static Item SteelPickaxe, SteelAxe, SteelShovel, SteelSword,
              SteelHoe;
              public static Item steelIngot, copperIngot;
              public static Item ironPlate, steelPlate, copperPlate;
              public static Item ironGear, steelGear, copperGear;
              public static Item redstoneCrystal;
              public static Item steelDust, coalDust, ironDust, copperDust;
              public static Item Engine;
              public static Item crusherBlade;
              // Blocks ----------------------------------------------
              
              public static Block Crusher;
              
              public static Block MachineBlock;
              
              // Other -------------------------------------------------
              
              public static ToolMaterial SteelTools = EnumHelper.addToolMaterial(
              "SteelTools", 2, 649, 10.0F, 3.0F, 20);
              
              public static CreativeTabs creatab;
              
              @EventHandler
              public void preInit(FMLPreInitializationEvent event) {
              
              // Item ---------------------------------------------
              
              Wrench = new Wrench().setUnlocalizedName("Wrench").setMaxStackSize(1)
              .setCreativeTab(CreativeTabs.tabTools)
              .setTextureName("modmechanicalcraft:Wrench");
              Hammer = new Hammer().setUnlocalizedName("Hammer").setMaxStackSize(1)
              .setCreativeTab(CreativeTabs.tabTools)
              .setTextureName("modmechanicalcraft:Hammer");
              steelIngot = new steelIngot().setUnlocalizedName("steelIngot")
              .setCreativeTab(CreativeTabs.tabMaterials)
              .setTextureName("modmechanicalcraft:steelingot");
              coalDust = new coalDust().setUnlocalizedName("coalDust")
              .setCreativeTab(CreativeTabs.tabMaterials)
              .setTextureName("modmechanicalcraft:coaldust");
              ironPlate = new ironPlate().setUnlocalizedName("ironPlate")
              .setCreativeTab(CreativeTabs.tabMaterials)
              .setTextureName("modmechanicalcraft:ironplate");
              steelPlate = new steelPlate().setUnlocalizedName("steelPlate")
              .setCreativeTab(CreativeTabs.tabMaterials)
              .setTextureName("modmechanicalcraft:steelplate");
              ironGear = new ironGear().setUnlocalizedName("ironGear")
              .setCreativeTab(CreativeTabs.tabMaterials)
              .setTextureName("modmechanicalcraft:irongear");
              redstoneCrystal = new redstoneCrystal()
              .setUnlocalizedName("redstoneCrystal")
              .setCreativeTab(CreativeTabs.tabMaterials)
              .setTextureName("modmechanicalcraft:redstonecrystal");
              steelGear = new steelGear().setUnlocalizedName("steelGear")
              .setCreativeTab(CreativeTabs.tabMaterials)
              .setTextureName("modmechanicalcraft:steelGear");
              ironDust = new ironDust().setUnlocalizedName("ironDust")
              .setCreativeTab(CreativeTabs.tabMaterials)
              .setTextureName("modmechanicalcraft:ironDust");
              steelDust = new steelDust().setUnlocalizedName("steelDust")
              .setCreativeTab(CreativeTabs.tabMaterials)
              .setTextureName("modmechanicalcraft:steelDust");
              Pliers = new Pliers().setUnlocalizedName("Pliers").setMaxStackSize(1)
              .setCreativeTab(CreativeTabs.tabTools)
              .setTextureName("modmechanicalcraft:pliers");
              Engine = new Engine().setUnlocalizedName("Engine")
              .setCreativeTab(CreativeTabs.tabMaterials)
              .setTextureName("modmechanicalcraft:engine");
              copperGear = new CopperGear().setUnlocalizedName("copperGear")
              .setCreativeTab(CreativeTabs.tabMaterials)
              .setTextureName("modmechanicalcraft:copperGear");
              copperIngot = new CopperIngot().setUnlocalizedName("copperIngot")
              .setCreativeTab(CreativeTabs.tabMaterials)
              .setTextureName("modmechanicalcraft:copperIngot");
              copperDust = new CopperDust().setUnlocalizedName("copperDust")
              .setCreativeTab(CreativeTabs.tabMaterials)
              .setTextureName("modmechanicalcraft:copperDust");
              copperPlate = new copperPlate().setUnlocalizedName("copperPlate")
              .setCreativeTab(CreativeTabs.tabMaterials)
              .setTextureName("modmechanicalcraft:copperPlate");
              crusherBlade = new crusherBlade().setUnlocalizedName("crusherBlade")
              .setCreativeTab(CreativeTabs.tabMaterials)
              .setTextureName("modmechanicalcraft:crusherBlade");
              SteelPickaxe = new SteelPickaxe(SteelTools)
              .setUnlocalizedName("SteelPickaxe")
              .setCreativeTab(CreativeTabs.tabTools)
              .setTextureName("modmechanicalcraft:steelpickaxe");
              SteelAxe = new SteelAxe(SteelTools).setUnlocalizedName("SteelAxe")
              .setCreativeTab(CreativeTabs.tabTools)
              .setTextureName("modmechanicalcraft:steelaxe");
              SteelShovel = new SteelShovel(SteelTools)
              .setUnlocalizedName("SteelShovel")
              .setCreativeTab(CreativeTabs.tabTools)
              .setTextureName("modmechanicalcraft:steelshovel");
              SteelSword = new SteelSword(SteelTools)
              .setUnlocalizedName("SteelSword")
              .setCreativeTab(CreativeTabs.tabTools)
              .setTextureName("modmechanicalcraft:steelsword");
              SteelHoe = new SteelHoe(SteelTools).setUnlocalizedName("SteelHoe")
              .setCreativeTab(CreativeTabs.tabTools)
              .setTextureName("modmechanicalcraft:steelhoe");
              
              // Blocks ------------------------------------------------
              
              Crusher = new Crusher(Material.iron).setBlockName("Crusher")
              .setCreativeTab(CreativeTabs.tabRedstone);
              
              MachineBlock = new MachineBlock(Material.iron)
              .setCreativeTab(CreativeTabs.tabMaterials)
              .setBlockName("MachineBlock")
              .setBlockTextureName("modmechanicalcraft:crusher_left_right");
              
              // Other -------------------------------------------------------
              
              creatab = new Ctab("Ctab");
              
              // Item --------------------------------------------------
              
              GameRegistry.registerItem(Wrench, "Wrench");
              GameRegistry.registerItem(Hammer, "Hammer");
              GameRegistry.registerItem(steelIngot, "steelIngot");
              GameRegistry.registerItem(coalDust, "coalDust");
              GameRegistry.registerItem(ironPlate, "ironPlate");
              GameRegistry.registerItem(steelPlate, "steelPlate");
              GameRegistry.registerItem(ironGear, "ironGear");
              GameRegistry.registerItem(steelGear, "steelGear");
              GameRegistry.registerItem(steelDust, "steelDust");
              GameRegistry.registerItem(ironDust, "ironDust");
              GameRegistry.registerItem(redstoneCrystal, "redstoneCrystal");
              GameRegistry.registerItem(Engine, "Engine");
              GameRegistry.registerItem(Pliers, "Pliers");
              GameRegistry.registerItem(copperIngot, "copperIngot");
              GameRegistry.registerItem(copperDust, "copperDust");
              GameRegistry.registerItem(copperGear, "copperGear");
              GameRegistry.registerItem(copperPlate, "copperPlate");
              GameRegistry.registerItem(crusherBlade, "crusherBlade");
              GameRegistry.registerItem(SteelPickaxe, "SteelPickaxe");
              GameRegistry.registerItem(SteelAxe, "SteelAxe");
              GameRegistry.registerItem(SteelShovel, "SteelShovel");
              GameRegistry.registerItem(SteelSword, "SteelSword");
              GameRegistry.registerItem(SteelHoe, "SteelHoe");
              
              // Blocks ---------------------------------------------
              
              GameRegistry.registerBlock(Crusher, "Crusher");
              GameRegistry.registerBlock(MachineBlock, "MachineBlock");
              
              // TileEntity ---------------------------------------------
              
              GameRegistry.registerTileEntity(TileCrusher.class,
              "modmechanicalcraft:Crusher");
              
              // Other-----------------------------------------------------------------
              
              // -----------------------------------------------------------------
              
              // Recipe --------------------------------------------------------------
              
              GameRegistry.addRecipe(new ItemStack(Wrench, 1, 0), new Object[]{"I I",
              " O ", " I ", 'I', new ItemStack(Items.iron_ingot, 1, 0), 'O',
              new ItemStack(Items.dye, 1, 14)});
              
              GameRegistry.addRecipe(new ItemStack(Hammer, 1, 0), new Object[]{"III",
              "III", " S ", 'S', new ItemStack(Items.stick, 1, 0), 'I',
              new ItemStack(Items.iron_ingot, 1, 0)});
              
              GameRegistry
              .addShapelessRecipe(new ItemStack(ironPlate, 2, 0),
              new Object[]{
              new ItemStack(Items.iron_ingot, 1, 0),
              new ItemStack(Hammer, 1,
              OreDictionary.WILDCARD_VALUE)});
              
              GameRegistry
              .addShapelessRecipe(new ItemStack(steelPlate, 2), new Object[]{
              new ItemStack(steelIngot, 1, 0),
              new ItemStack(Hammer, 1, OreDictionary.WILDCARD_VALUE)});
              
              GameRegistry.addRecipe(new ItemStack(ironGear, 1, 0), new Object[]{
              " I ", "ICI", " I ", 'I',
              new ItemStack(Items.iron_ingot, 1, 0), 'C',
              new ItemStack(copperGear, 1, 0)});
              
              GameRegistry.addRecipe(new ItemStack(steelGear, 1, 0), new Object[]{
              " L ", "LIL", " L ", 'L', new ItemStack(steelIngot, 1, 0), 'I',
              new ItemStack(ironGear, 1, 0)});
              
              GameRegistry.addRecipe(new ItemStack(crusherBlade, 1, 0), new Object[]{
              " D ", "DID", " D ", 'I',
              new ItemStack(Items.iron_ingot, 1, 0), 'D',
              new ItemStack(Items.diamond, 1, 0)});
              
              GameRegistry.addShapelessRecipe(new ItemStack(steelDust, 2),
              new Object[]{new ItemStack(ironDust, 1, 0),
              new ItemStack(ironDust, 1, 0),
              new ItemStack(coalDust, 1, 0),
              new ItemStack(coalDust, 1, 0)});
              
              GameRegistry.addRecipe(new ItemStack(redstoneCrystal, 1, 0),
              new Object[]{"RRR", "RDR", "RRR", 'R',
              new ItemStack(Items.redstone, 1, 0), 'D',
              new ItemStack(Items.diamond, 1, 0)});
              
              GameRegistry.addRecipe(new ItemStack(Pliers, 1, 0), new Object[]{"I I",
              " I ", "D D", 'I', new ItemStack(Items.iron_ingot, 1, 0), 'D',
              new ItemStack(Items.dye, 1, 6)});
              
              GameRegistry.addRecipe(new ItemStack(Engine, 1, 0), new Object[]{"PGP",
              "PFP", "PGP", 'G', new ItemStack(ironGear, 1, 0), 'P',
              new ItemStack(ironPlate, 1, 0), 'F',
              new ItemStack(Blocks.furnace, 1, 0)});
              
              GameRegistry.addRecipe(new ItemStack(copperGear, 2, 0), new Object[]{
              " C ", "CCC", " C ", 'C', new ItemStack(copperIngot, 1, 0)});
              
              GameRegistry
              .addShapelessRecipe(new ItemStack(copperPlate, 2, 0),
              new Object[]{
              new ItemStack(copperIngot, 1, 0),
              new ItemStack(Hammer, 1,
              OreDictionary.WILDCARD_VALUE)});
              
              GameRegistry.addRecipe(new ItemStack(MachineBlock, 2, 0), new Object[]{
              "PPP", "P P", "PPP", 'P', new ItemStack(ironPlate, 1, 0)});
              
              GameRegistry.addRecipe(new ItemStack(Crusher, 1, 0), new Object[]{
              "PMP", "PEP", "PBP", 'P', new ItemStack(ironPlate), 'M',
              new ItemStack(MachineBlock), 'E', new ItemStack(Engine), 'B',
              new ItemStack(crusherBlade)});
              
              GameRegistry.addRecipe(new ItemStack(SteelPickaxe, 1, 0), new Object[]{
              "III", " S ", " S ", 'S', new ItemStack(Items.stick, 1, 0),
              'I', new ItemStack(steelIngot, 1, 0)});
              
              GameRegistry.addRecipe(new ItemStack(SteelAxe, 1, 0), new Object[]{
              " II", " SI", " S ", 'S', new ItemStack(Items.stick, 1, 0),
              'I', new ItemStack(steelIngot, 1, 0)});
              
              GameRegistry.addRecipe(new ItemStack(SteelAxe, 1, 0), new Object[]{
              "II ", "IS ", " S ", 'S', new ItemStack(Items.stick, 1, 0),
              'I', new ItemStack(steelIngot, 1, 0)});
              
              GameRegistry.addRecipe(new ItemStack(SteelShovel, 1, 0), new Object[]{
              " I ", " S ", " S ", 'S', new ItemStack(Items.stick, 1, 0),
              'I', new ItemStack(steelIngot, 1, 0)});
              
              GameRegistry.addRecipe(new ItemStack(SteelShovel, 1, 0), new Object[]{
              "  I", "  S", "  S", 'S', new ItemStack(Items.stick, 1, 0),
              'I', new ItemStack(steelIngot, 1, 0)});
              
              GameRegistry.addRecipe(new ItemStack(SteelShovel, 1, 0), new Object[]{
              "I  ", "S  ", "S  ", 'S', new ItemStack(Items.stick, 1, 0),
              'I', new ItemStack(steelIngot, 1, 0)});
              
              GameRegistry.addRecipe(new ItemStack(SteelHoe, 1, 0), new Object[]{
              " II", " S ", " S ", 'S', new ItemStack(Items.stick, 1, 0),
              'I', new ItemStack(steelIngot, 1, 0)});
              
              GameRegistry.addRecipe(new ItemStack(SteelHoe, 1, 0), new Object[]{
              "II ", " S ", " S ", 'S', new ItemStack(Items.stick, 1, 0),
              'I', new ItemStack(steelIngot, 1, 0)});
              
              GameRegistry.addRecipe(new ItemStack(SteelSword, 1, 0), new Object[]{
              " I ", " I ", " S ", 'S', new ItemStack(Items.stick, 1, 0),
              'I', new ItemStack(steelIngot, 1, 0)});
              
              GameRegistry.addRecipe(new ItemStack(SteelSword, 1, 0), new Object[]{
              "I  ", "I  ", "S  ", 'S', new ItemStack(Items.stick, 1, 0),
              'I', new ItemStack(steelIngot, 1, 0)});
              
              GameRegistry.addRecipe(new ItemStack(SteelSword, 1, 0), new Object[]{
              "  I", "  I", "  S", 'S', new ItemStack(Items.stick, 1, 0),
              'I', new ItemStack(steelIngot, 1, 0)});
              
              // Smelting Recipe -------------------------------
              
              GameRegistry.addSmelting(new ItemStack(steelDust), new ItemStack(
              steelIngot), 30);
              
              GameRegistry.addSmelting(new ItemStack(copperDust), new ItemStack(
              copperIngot), 30);
              
              GameRegistry.addSmelting(new ItemStack(ironDust), new ItemStack(
              Items.iron_ingot), 30);
              
              // =========================================================================================================
              
              }
              
              @EventHandler
              public void init(FMLInitializationEvent event) {
              proxy.registerRender();
              }
              
              @EventHandler
              public void postInit(FMLPostInitializationEvent event) {
              }
              
              public static final String MODID = "modmechanicalcraft";
              
              }
              
              1 réponse Dernière réponse Répondre Citer 0
              • robin4002R Hors-ligne
                robin4002 Moddeurs confirmés Rédacteurs Administrateurs
                dernière édition par

                ​package com.google.SpyMan.Mechanicalcraft.common;
                
                import java.util.ArrayList;
                import java.util.List;
                
                import net.minecraft.creativetab.CreativeTabs;
                import net.minecraft.init.Blocks;
                import net.minecraft.init.Items;
                import net.minecraft.item.Item;
                import net.minecraft.item.Item.ToolMaterial;
                import net.minecraft.item.ItemAxe;
                import net.minecraft.item.ItemHoe;
                import net.minecraft.item.ItemPickaxe;
                import net.minecraft.item.ItemSpade;
                import net.minecraft.item.ItemStack;
                import net.minecraft.item.ItemSword;
                import net.minecraft.item.ItemTool;
                import net.minecraft.block.Block;
                import net.minecraft.block.material.Material;
                import net.minecraftforge.common.util.EnumHelper;
                import net.minecraftforge.oredict.OreDictionary;
                
                import com.google.SpyMan.Mechanicalcraft.proxy.ClientProxy;
                import com.google.SpyMan.Mechanicalcraft.proxy.CommonProxy;
                
                import cpw.mods.fml.common.FMLCommonHandler;
                import cpw.mods.fml.common.Mod;
                import cpw.mods.fml.common.Mod.EventHandler;
                import cpw.mods.fml.common.Mod.Instance;
                import cpw.mods.fml.common.SidedProxy;
                import cpw.mods.fml.common.event.FMLInitializationEvent;
                import cpw.mods.fml.common.event.FMLPostInitializationEvent;
                import cpw.mods.fml.common.event.FMLPreInitializationEvent;
                import cpw.mods.fml.common.registry.GameRegistry;
                
                @Mod(modid = "modmechanicalcraft", name = "MechanicalCraft_beta", version = "1.0.0")
                public class mod_mechanicalcraft {
                
                @Instance("modmechanicalcraft")
                public static mod_mechanicalcraft instance;
                
                @SidedProxy(clientSide = "com.google.SpyMan.Mechanicalcraft.proxy.ClientProxy", serverSide = "com.google.SpyMan.Mechanicalcraft.proxy.CommonProxy")
                public static CommonProxy proxy;
                
                // Item –---------------------------------------------
                
                public static Item Wrench, Hammer, Pliers;
                public static Item SteelPickaxe, SteelAxe, SteelShovel, SteelSword,
                SteelHoe;
                public static Item steelIngot, copperIngot;
                public static Item ironPlate, steelPlate, copperPlate;
                public static Item ironGear, steelGear, copperGear;
                public static Item redstoneCrystal;
                public static Item steelDust, coalDust, ironDust, copperDust;
                public static Item Engine;
                public static Item crusherBlade;
                // Blocks ----------------------------------------------
                
                public static Block Crusher;
                
                public static Block MachineBlock;
                
                // Other -------------------------------------------------
                
                public static ToolMaterial SteelTools = EnumHelper.addToolMaterial(
                "SteelTools", 2, 649, 10.0F, 3.0F, 20);
                
                public static CreativeTabs creatab = new Ctab("Ctab");
                
                @EventHandler
                public void preInit(FMLPreInitializationEvent event) {
                
                // Item ---------------------------------------------
                
                Wrench = new Wrench().setUnlocalizedName("Wrench").setMaxStackSize(1)
                .setCreativeTab(creatab)
                .setTextureName("modmechanicalcraft:Wrench");
                Hammer = new Hammer().setUnlocalizedName("Hammer").setMaxStackSize(1)
                .setCreativeTab(CreativeTabs.tabTools)
                .setTextureName("modmechanicalcraft:Hammer");
                steelIngot = new steelIngot().setUnlocalizedName("steelIngot")
                .setCreativeTab(CreativeTabs.tabMaterials)
                .setTextureName("modmechanicalcraft:steelingot");
                coalDust = new coalDust().setUnlocalizedName("coalDust")
                .setCreativeTab(CreativeTabs.tabMaterials)
                .setTextureName("modmechanicalcraft:coaldust");
                ironPlate = new ironPlate().setUnlocalizedName("ironPlate")
                .setCreativeTab(CreativeTabs.tabMaterials)
                .setTextureName("modmechanicalcraft:ironplate");
                steelPlate = new steelPlate().setUnlocalizedName("steelPlate")
                .setCreativeTab(CreativeTabs.tabMaterials)
                .setTextureName("modmechanicalcraft:steelplate");
                ironGear = new ironGear().setUnlocalizedName("ironGear")
                .setCreativeTab(CreativeTabs.tabMaterials)
                .setTextureName("modmechanicalcraft:irongear");
                redstoneCrystal = new redstoneCrystal()
                .setUnlocalizedName("redstoneCrystal")
                .setCreativeTab(CreativeTabs.tabMaterials)
                .setTextureName("modmechanicalcraft:redstonecrystal");
                steelGear = new steelGear().setUnlocalizedName("steelGear")
                .setCreativeTab(CreativeTabs.tabMaterials)
                .setTextureName("modmechanicalcraft:steelGear");
                ironDust = new ironDust().setUnlocalizedName("ironDust")
                .setCreativeTab(CreativeTabs.tabMaterials)
                .setTextureName("modmechanicalcraft:ironDust");
                steelDust = new steelDust().setUnlocalizedName("steelDust")
                .setCreativeTab(CreativeTabs.tabMaterials)
                .setTextureName("modmechanicalcraft:steelDust");
                Pliers = new Pliers().setUnlocalizedName("Pliers").setMaxStackSize(1)
                .setCreativeTab(CreativeTabs.tabTools)
                .setTextureName("modmechanicalcraft:pliers");
                Engine = new Engine().setUnlocalizedName("Engine")
                .setCreativeTab(CreativeTabs.tabMaterials)
                .setTextureName("modmechanicalcraft:engine");
                copperGear = new CopperGear().setUnlocalizedName("copperGear")
                .setCreativeTab(CreativeTabs.tabMaterials)
                .setTextureName("modmechanicalcraft:copperGear");
                copperIngot = new CopperIngot().setUnlocalizedName("copperIngot")
                .setCreativeTab(CreativeTabs.tabMaterials)
                .setTextureName("modmechanicalcraft:copperIngot");
                copperDust = new CopperDust().setUnlocalizedName("copperDust")
                .setCreativeTab(CreativeTabs.tabMaterials)
                .setTextureName("modmechanicalcraft:copperDust");
                copperPlate = new copperPlate().setUnlocalizedName("copperPlate")
                .setCreativeTab(CreativeTabs.tabMaterials)
                .setTextureName("modmechanicalcraft:copperPlate");
                crusherBlade = new crusherBlade().setUnlocalizedName("crusherBlade")
                .setCreativeTab(CreativeTabs.tabMaterials)
                .setTextureName("modmechanicalcraft:crusherBlade");
                SteelPickaxe = new SteelPickaxe(SteelTools)
                .setUnlocalizedName("SteelPickaxe")
                .setCreativeTab(CreativeTabs.tabTools)
                .setTextureName("modmechanicalcraft:steelpickaxe");
                SteelAxe = new SteelAxe(SteelTools).setUnlocalizedName("SteelAxe")
                .setCreativeTab(CreativeTabs.tabTools)
                .setTextureName("modmechanicalcraft:steelaxe");
                SteelShovel = new SteelShovel(SteelTools)
                .setUnlocalizedName("SteelShovel")
                .setCreativeTab(CreativeTabs.tabTools)
                .setTextureName("modmechanicalcraft:steelshovel");
                SteelSword = new SteelSword(SteelTools)
                .setUnlocalizedName("SteelSword")
                .setCreativeTab(CreativeTabs.tabTools)
                .setTextureName("modmechanicalcraft:steelsword");
                SteelHoe = new SteelHoe(SteelTools).setUnlocalizedName("SteelHoe")
                .setCreativeTab(CreativeTabs.tabTools)
                .setTextureName("modmechanicalcraft:steelhoe");
                
                // Blocks ------------------------------------------------
                
                Crusher = new Crusher(Material.iron).setBlockName("Crusher")
                .setCreativeTab(CreativeTabs.tabRedstone);
                
                MachineBlock = new MachineBlock(Material.iron)
                .setCreativeTab(CreativeTabs.tabMaterials)
                .setBlockName("MachineBlock")
                .setBlockTextureName("modmechanicalcraft:crusher_left_right");
                
                // Item --------------------------------------------------
                
                GameRegistry.registerItem(Wrench, "Wrench");
                GameRegistry.registerItem(Hammer, "Hammer");
                GameRegistry.registerItem(steelIngot, "steelIngot");
                GameRegistry.registerItem(coalDust, "coalDust");
                GameRegistry.registerItem(ironPlate, "ironPlate");
                GameRegistry.registerItem(steelPlate, "steelPlate");
                GameRegistry.registerItem(ironGear, "ironGear");
                GameRegistry.registerItem(steelGear, "steelGear");
                GameRegistry.registerItem(steelDust, "steelDust");
                GameRegistry.registerItem(ironDust, "ironDust");
                GameRegistry.registerItem(redstoneCrystal, "redstoneCrystal");
                GameRegistry.registerItem(Engine, "Engine");
                GameRegistry.registerItem(Pliers, "Pliers");
                GameRegistry.registerItem(copperIngot, "copperIngot");
                GameRegistry.registerItem(copperDust, "copperDust");
                GameRegistry.registerItem(copperGear, "copperGear");
                GameRegistry.registerItem(copperPlate, "copperPlate");
                GameRegistry.registerItem(crusherBlade, "crusherBlade");
                GameRegistry.registerItem(SteelPickaxe, "SteelPickaxe");
                GameRegistry.registerItem(SteelAxe, "SteelAxe");
                GameRegistry.registerItem(SteelShovel, "SteelShovel");
                GameRegistry.registerItem(SteelSword, "SteelSword");
                GameRegistry.registerItem(SteelHoe, "SteelHoe");
                
                // Blocks ---------------------------------------------
                
                GameRegistry.registerBlock(Crusher, "Crusher");
                GameRegistry.registerBlock(MachineBlock, "MachineBlock");
                
                // TileEntity ---------------------------------------------
                
                GameRegistry.registerTileEntity(TileCrusher.class,
                "modmechanicalcraft:Crusher");
                
                // Other-----------------------------------------------------------------
                
                // -----------------------------------------------------------------
                
                // Recipe --------------------------------------------------------------
                
                GameRegistry.addRecipe(new ItemStack(Wrench, 1, 0), new Object[]{"I I",
                " O ", " I ", 'I', new ItemStack(Items.iron_ingot, 1, 0), 'O',
                new ItemStack(Items.dye, 1, 14)});
                
                GameRegistry.addRecipe(new ItemStack(Hammer, 1, 0), new Object[]{"III",
                "III", " S ", 'S', new ItemStack(Items.stick, 1, 0), 'I',
                new ItemStack(Items.iron_ingot, 1, 0)});
                
                GameRegistry
                .addShapelessRecipe(new ItemStack(ironPlate, 2, 0),
                new Object[]{
                new ItemStack(Items.iron_ingot, 1, 0),
                new ItemStack(Hammer, 1,
                OreDictionary.WILDCARD_VALUE)});
                
                GameRegistry
                .addShapelessRecipe(new ItemStack(steelPlate, 2), new Object[]{
                new ItemStack(steelIngot, 1, 0),
                new ItemStack(Hammer, 1, OreDictionary.WILDCARD_VALUE)});
                
                GameRegistry.addRecipe(new ItemStack(ironGear, 1, 0), new Object[]{
                " I ", "ICI", " I ", 'I',
                new ItemStack(Items.iron_ingot, 1, 0), 'C',
                new ItemStack(copperGear, 1, 0)});
                
                GameRegistry.addRecipe(new ItemStack(steelGear, 1, 0), new Object[]{
                " L ", "LIL", " L ", 'L', new ItemStack(steelIngot, 1, 0), 'I',
                new ItemStack(ironGear, 1, 0)});
                
                GameRegistry.addRecipe(new ItemStack(crusherBlade, 1, 0), new Object[]{
                " D ", "DID", " D ", 'I',
                new ItemStack(Items.iron_ingot, 1, 0), 'D',
                new ItemStack(Items.diamond, 1, 0)});
                
                GameRegistry.addShapelessRecipe(new ItemStack(steelDust, 2),
                new Object[]{new ItemStack(ironDust, 1, 0),
                new ItemStack(ironDust, 1, 0),
                new ItemStack(coalDust, 1, 0),
                new ItemStack(coalDust, 1, 0)});
                
                GameRegistry.addRecipe(new ItemStack(redstoneCrystal, 1, 0),
                new Object[]{"RRR", "RDR", "RRR", 'R',
                new ItemStack(Items.redstone, 1, 0), 'D',
                new ItemStack(Items.diamond, 1, 0)});
                
                GameRegistry.addRecipe(new ItemStack(Pliers, 1, 0), new Object[]{"I I",
                " I ", "D D", 'I', new ItemStack(Items.iron_ingot, 1, 0), 'D',
                new ItemStack(Items.dye, 1, 6)});
                
                GameRegistry.addRecipe(new ItemStack(Engine, 1, 0), new Object[]{"PGP",
                "PFP", "PGP", 'G', new ItemStack(ironGear, 1, 0), 'P',
                new ItemStack(ironPlate, 1, 0), 'F',
                new ItemStack(Blocks.furnace, 1, 0)});
                
                GameRegistry.addRecipe(new ItemStack(copperGear, 2, 0), new Object[]{
                " C ", "CCC", " C ", 'C', new ItemStack(copperIngot, 1, 0)});
                
                GameRegistry
                .addShapelessRecipe(new ItemStack(copperPlate, 2, 0),
                new Object[]{
                new ItemStack(copperIngot, 1, 0),
                new ItemStack(Hammer, 1,
                OreDictionary.WILDCARD_VALUE)});
                
                GameRegistry.addRecipe(new ItemStack(MachineBlock, 2, 0), new Object[]{
                "PPP", "P P", "PPP", 'P', new ItemStack(ironPlate, 1, 0)});
                
                GameRegistry.addRecipe(new ItemStack(Crusher, 1, 0), new Object[]{
                "PMP", "PEP", "PBP", 'P', new ItemStack(ironPlate), 'M',
                new ItemStack(MachineBlock), 'E', new ItemStack(Engine), 'B',
                new ItemStack(crusherBlade)});
                
                GameRegistry.addRecipe(new ItemStack(SteelPickaxe, 1, 0), new Object[]{
                "III", " S ", " S ", 'S', new ItemStack(Items.stick, 1, 0),
                'I', new ItemStack(steelIngot, 1, 0)});
                
                GameRegistry.addRecipe(new ItemStack(SteelAxe, 1, 0), new Object[]{
                " II", " SI", " S ", 'S', new ItemStack(Items.stick, 1, 0),
                'I', new ItemStack(steelIngot, 1, 0)});
                
                GameRegistry.addRecipe(new ItemStack(SteelAxe, 1, 0), new Object[]{
                "II ", "IS ", " S ", 'S', new ItemStack(Items.stick, 1, 0),
                'I', new ItemStack(steelIngot, 1, 0)});
                
                GameRegistry.addRecipe(new ItemStack(SteelShovel, 1, 0), new Object[]{
                " I ", " S ", " S ", 'S', new ItemStack(Items.stick, 1, 0),
                'I', new ItemStack(steelIngot, 1, 0)});
                
                GameRegistry.addRecipe(new ItemStack(SteelShovel, 1, 0), new Object[]{
                "  I", "  S", "  S", 'S', new ItemStack(Items.stick, 1, 0),
                'I', new ItemStack(steelIngot, 1, 0)});
                
                GameRegistry.addRecipe(new ItemStack(SteelShovel, 1, 0), new Object[]{
                "I  ", "S  ", "S  ", 'S', new ItemStack(Items.stick, 1, 0),
                'I', new ItemStack(steelIngot, 1, 0)});
                
                GameRegistry.addRecipe(new ItemStack(SteelHoe, 1, 0), new Object[]{
                " II", " S ", " S ", 'S', new ItemStack(Items.stick, 1, 0),
                'I', new ItemStack(steelIngot, 1, 0)});
                
                GameRegistry.addRecipe(new ItemStack(SteelHoe, 1, 0), new Object[]{
                "II ", " S ", " S ", 'S', new ItemStack(Items.stick, 1, 0),
                'I', new ItemStack(steelIngot, 1, 0)});
                
                GameRegistry.addRecipe(new ItemStack(SteelSword, 1, 0), new Object[]{
                " I ", " I ", " S ", 'S', new ItemStack(Items.stick, 1, 0),
                'I', new ItemStack(steelIngot, 1, 0)});
                
                GameRegistry.addRecipe(new ItemStack(SteelSword, 1, 0), new Object[]{
                "I  ", "I  ", "S  ", 'S', new ItemStack(Items.stick, 1, 0),
                'I', new ItemStack(steelIngot, 1, 0)});
                
                GameRegistry.addRecipe(new ItemStack(SteelSword, 1, 0), new Object[]{
                "  I", "  I", "  S", 'S', new ItemStack(Items.stick, 1, 0),
                'I', new ItemStack(steelIngot, 1, 0)});
                
                // Smelting Recipe -------------------------------
                
                GameRegistry.addSmelting(new ItemStack(steelDust), new ItemStack(
                steelIngot), 30);
                
                GameRegistry.addSmelting(new ItemStack(copperDust), new ItemStack(
                copperIngot), 30);
                
                GameRegistry.addSmelting(new ItemStack(ironDust), new ItemStack(
                Items.iron_ingot), 30);
                
                // =========================================================================================================
                
                }
                
                @EventHandler
                public void init(FMLInitializationEvent event) {
                proxy.registerRender();
                }
                
                @EventHandler
                public void postInit(FMLPostInitializationEvent event) {
                }
                
                public static final String MODID = "modmechanicalcraft";
                
                }
                
                1 réponse Dernière réponse Répondre Citer 0
                • SpyManS Hors-ligne
                  SpyMan
                  dernière édition par

                  Quel est la différence ???

                  1 réponse Dernière réponse Répondre Citer 0
                  • SpyManS Hors-ligne
                    SpyMan
                    dernière édition par

                    Quel est la différence ?

                    1 réponse Dernière réponse Répondre Citer 0
                    • robin4002R Hors-ligne
                      robin4002 Moddeurs confirmés Rédacteurs Administrateurs
                      dernière édition par

                      J’ai initialisé l’onglet créatif sur une ligne (et surtout avant les blocs) et j’ai ajouté Wrench dans ton onglet créatif.

                      1 réponse Dernière réponse Répondre Citer 0
                      • SpyManS Hors-ligne
                        SpyMan
                        dernière édition par

                        Merci de ton aide maintenant ça marche.  :shy:

                        1 réponse Dernière réponse Répondre Citer 0
                        • 1 / 1
                        • Premier message
                          Dernier message
                        Design by Woryk
                        ContactMentions Légales

                        MINECRAFT FORGE FRANCE © 2024

                        Powered by NodeBB