• S'inscrire
    • Se connecter
    • Recherche
    • Récent
    • Mots-clés
    • Populaire
    • Utilisateurs
    • Groupes

    Non résolu Pas d'item pour l'enchant[1.8.9]

    Sans suite
    1.8.9
    1
    1
    135
    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.
    • JustAnDev
      JustAnDev dernière édition par

      Re : Faire un enchantement
      Je voudrais faire un enchant,reussi on peut se le give avec le /enchant mais pas sous forme d’item
      preInit

      	
          
          	   enchantTuto = new EnchantmentTuto().setName("enchantTuto");
          	
          	   MinecraftForge.EVENT_BUS.register(new ClasseKiGereLesEnchantementsDeDaich());
       
          	
              logger = event.getModLog(); // initialise le logger. event.getModLog() retourne un logger avec votre modid
      
              
              blockBlue = new BlockBlue(Material.rock).setUnlocalizedName("blueore").setCreativeTab(daichCreativeTabs);
            
              book = new BlockBook(Material.wood).setUnlocalizedName("bookblock").setCreativeTab(daichCreativeTabs);
              MineIF = new MineIF(Material.iron).setUnlocalizedName("mineifdm").setCreativeTab(daichCreativeTabs);
              
              GameRegistry.registerBlock(book, "book"); // .json
              GameRegistry.registerBlock(MineIF, "mineif"); // .json
      
              
              GameRegistry.registerBlock(blockBlue,"poarpo"); 
              
              
              potionblue1 = new ItemPo().setCreativeTab(CreativeTabs.tabFood).setUnlocalizedName("popo1blue");
      
              GameRegistry.registerItem(potionblue1,"popo"); 
              
              
              
              
              
              
              poison = new Fluid("poison", null, null).setDensity(690000).setViscosity(9665).setTemperature(28682).setLuminosity(19).setUnlocalizedName("ingotliquid").setGaseous(true); 
             
              FluidRegistry.registerFluid(poison); // on register notre fluid
              poison = FluidRegistry.getFluid("poison");
       
              poisenouswaterb = new BlockFluidPoison(poison, Material.lava); // on crée notre block
              GameRegistry.registerBlock(poisenouswaterb, poisenouswaterb.getUnlocalizedName().substring(5)); //puis on le register
       
      poisonbucket = new ItemBucketPoison(MoDaichMod.poisenouswaterb).setUnlocalizedName("poisonbucket").setCreativeTab(CreativeTabs.tabMisc).setContainerItem(Items.bucket);
       
      GameRegistry.registerItem(poisonbucket , "bluebucket"); // on register l'item
       
      FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("poison", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(MoDaichMod.poisonbucket), FluidContainerRegistry.EMPTY_BUCKET);
      
      
      
      
      
      StructureGenerator structureGenerator = new StructureGenerator();
      
      
      
      
      
      GameRegistry.registerWorldGenerator(structureGenerator, 0);
      
      
      
      
      
      pack = new ItemTutoJetPack(jetpack, 1).setUnlocalizedName("packjmdm").setCreativeTab(daichCreativeTabs);
      
      
      GameRegistry.registerItem(pack, "jetpack");
      
      

      Enchant

      package com.daichmff.modaichmod;
      
      import net.minecraft.enchantment.Enchantment;
      import net.minecraft.enchantment.EnumEnchantmentType;
      import net.minecraft.util.ResourceLocation;
      
      public class EnchantmentTuto extends Enchantment {
      
      	protected EnchantmentTuto() {
      		super(120, null, 0, EnumEnchantmentType.WEAPON);
      		// TODO Auto-generated constructor stub
      	}
      	public int getMaxLevel() {
      	    return 10;
      	}
      }
      
      

      merci.

      s

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

      MINECRAFT FORGE FRANCE © 2018

      Powered by NodeBB