Crash lancement du jeu



  • voilla j'ai un crash quand je lance :

    j'ai vue que sa venais d'une class avec cette ligne :

    java.lang.IllegalArgumentException: Can not set static net.minecraft.item.Item$ToolMaterial field com.adamitemod.mod.init.ItemsMod.ADAMITE to com.adamitemod.mod.AdamiteMod

    voici ma class

    package com.adamitemod.mod.init;
    
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.item.Item;
    import net.minecraft.item.Item.ToolMaterial;
    import net.minecraft.item.ItemArmor.ArmorMaterial;
    import net.minecraftforge.common.util.EnumHelper;
    
    import com.adamitemod.mod.AdamiteMod;
    import com.adamitemod.mod.References;
    import com.adamitemod.mod.bushes.ItemExperienceBerry;
    import com.adamitemod.mod.items.ItemArmorMod;
    import com.adamitemod.mod.items.ItemAxeMod;
    import com.adamitemod.mod.items.ItemBackPack;
    import com.adamitemod.mod.items.ItemDynamite;
    import com.adamitemod.mod.items.ItemFoodAple;
    import com.adamitemod.mod.items.ItemMod;
    import com.adamitemod.mod.items.ItemPickaxeMod;
    import com.adamitemod.mod.items.ItemSpadeMod;
    import com.adamitemod.mod.items.ItemSwordMod;
    
    import cpw.mods.fml.common.Mod.Instance;
    import cpw.mods.fml.common.registry.GameRegistry;
    
    public class ItemsMod
    {
    @Instance(References.MOD_ID)
    
        public static ToolMaterial ADAMITE = EnumHelper.addToolMaterial("ADAMITE", 5, 3000, 20.0F, 7.0F, 10);
        public static ToolMaterial Fission = EnumHelper.addToolMaterial("Fission", 7, 4000, 25.0F, 8.0F, 11);
        public static ToolMaterial RUBY = EnumHelper.addToolMaterial("RUBY", 3, 1000, 7.0F, 3.0F, 10);
        public static ToolMaterial ZECTIUM = EnumHelper.addToolMaterial("ZECTIUM", 4, 2000, 10.0F, 5.0F, 10);
        public static ArmorMaterial ADAMITE_ARMOR = EnumHelper.addArmorMaterial("ADAMITE_ARMOR", 600, new int[]{6, 6, 5, 6}, 13);
        public static ArmorMaterial RUBY_ARMOR = EnumHelper.addArmorMaterial("RUBY_ARMOR", 250, new int[]{2, 6, 5, 2}, 9);
        public static ArmorMaterial ZECTIUM_ARMOR = EnumHelper.addArmorMaterial("ZECTIUM_ARMOR", 260, new int[]{6, 6, 5, 6}, 12);
        public static ArmorMaterial Fission_ARMOR = EnumHelper.addArmorMaterial("Fission_ARMOR", 800, new int[]{7, 7, 5, 7}, 16);
    
        public static Item adamite, rubyIngot, zectiumIngot, FissionSword, FissionPickaxe, fissionpomme;
        public static Item adamiteSword, rubySword, zectiumSword, FissionAxe;
        public static Item adamitePickaxe, rubyPickaxe, zectiumPickaxe;
        public static Item adamiteAxe, rubyAxe, zectiumAxe;
        public static Item adamiteShovel, rubyShovel, zectiumShovel;
    
        public static Item EnderStick, StickDeForce, SpeedStick, HealStick, Adasceptre, HealStone, EnderStone, StrengthStone, Speed;
    
        public static Item adamiteHelmet, rubyHelmet, zectiumHelmet, FissionHelmet;
        public static Item adamiteChestplate, rubyChestplate, zectiumChestplate, FissionChestplate;
        public static Item adamiteLeggings, rubyLeggings, zectiumLeggings, FissionLeggings;
        public static Item adamiteBoots, rubyBoots, zectiumBoots, FissionBoots, adapo;
        public static Item fission;
        public static ItemExperienceBerry experienceBerry;
    
        public static void init()
        {
            adamite = new ItemMod().setUnlocalizedName("adamite").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":adamite");
            HealStone = new ItemMod().setUnlocalizedName("HealStone").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":He");
            StickDeForce = new com.adamitemod.mod.items.StickDeForce().setUnlocalizedName("StickDeForce").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":SW");
            EnderStick = new com.adamitemod.mod.items.EnderStick().setUnlocalizedName("EnderStick").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":EnderStick");
            SpeedStick = new com.adamitemod.mod.items.SpeedStick().setUnlocalizedName("SpeedStick").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":SpeedStick");
            HealStick = new com.adamitemod.mod.items.HealStick().setUnlocalizedName("HealStick").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":HealStick");
            Adasceptre = new com.adamitemod.mod.items.Adasceptre().setUnlocalizedName("Adasceptre").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":M");
            EnderStone = new ItemMod().setUnlocalizedName("EnderStone").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":En");
            StrengthStone = new ItemMod().setUnlocalizedName("StrengthStone").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":St");
            Speed = new ItemMod().setUnlocalizedName("Speed").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":sp");
    
            experienceBerry = new ItemExperienceBerry();
    
            rubyIngot = new ItemMod().setUnlocalizedName("rubyIngot").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":rubyIngot");
            zectiumIngot = new ItemMod().setUnlocalizedName("zectiumIngot").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":zectiumIngot");
            adamiteSword = new ItemSwordMod(ADAMITE).setUnlocalizedName("adamiteSword").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":Sword");
            FissionSword = new ItemSwordMod(Fission).setUnlocalizedName("FissionSword").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":FissionSword");
            rubySword = new ItemSwordMod(RUBY).setUnlocalizedName("rubySword").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":rubySword");
            zectiumSword = new ItemSwordMod(ZECTIUM).setUnlocalizedName("zectiumSword").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":zectiumSword");
            adamitePickaxe = new ItemPickaxeMod(ADAMITE).setUnlocalizedName("adamitePickaxe").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":adamitePickaxe");
            rubyPickaxe = new ItemPickaxeMod(RUBY).setUnlocalizedName("rubyPickaxe").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":rubyPickaxe");
            FissionPickaxe = new ItemPickaxeMod(Fission).setUnlocalizedName("FissionPickaxe").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":FissionPickaxe");
            zectiumPickaxe = new ItemPickaxeMod(ZECTIUM).setUnlocalizedName("zectiumPickaxe").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":zectiumPickaxe");
            FissionAxe = new ItemAxeMod(Fission).setUnlocalizedName("FissionAxe").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":FissionAxe");
            adamiteAxe = new ItemAxeMod(ADAMITE).setUnlocalizedName("adamiteAxe").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":adamiteAxe");
            rubyAxe = new ItemAxeMod(RUBY).setUnlocalizedName("rubyAxe").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":rubyAxe");
            zectiumAxe = new ItemAxeMod(ZECTIUM).setUnlocalizedName("zectiumAxe").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":zectiumAxe");
            adamiteShovel = new ItemSpadeMod(ADAMITE).setUnlocalizedName("adamiteSpade").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":adamiteShovel");
            rubyShovel = new ItemSpadeMod(RUBY).setUnlocalizedName("rubySpade").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":rubyShovel");
            zectiumShovel = new ItemSpadeMod(ZECTIUM).setUnlocalizedName("zectiumSpade").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":zectiumShovel");       
            FissionHelmet = new com.adamitemod.mod.items.HelmetFission(Fission_ARMOR, 0).setUnlocalizedName("FissionHelmet").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":FissionHelmet");
            FissionBoots = new com.adamitemod.mod.items.FissionBoots(Fission_ARMOR, 3).setUnlocalizedName("FissionBoots").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":FissionBoots");
            FissionLeggings = new com.adamitemod.mod.items.FissionLeggings(Fission_ARMOR, 2).setUnlocalizedName("FissionLeggings").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":FissionLeggings");
            FissionChestplate = new ItemArmorMod(Fission_ARMOR, 1).setUnlocalizedName("FissionChestplate").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":FissionChestplate");
            adamiteHelmet = new com.adamitemod.mod.items.Helmet(ADAMITE_ARMOR, 0).setUnlocalizedName("adamiteHelmet").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":adamiteHelmet");
            rubyHelmet = new ItemArmorMod(RUBY_ARMOR, 0).setUnlocalizedName("rubyHelmet").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":rubyHelmet");
            zectiumHelmet = new ItemArmorMod(ZECTIUM_ARMOR, 0).setUnlocalizedName("zectiumHelmet").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":zectiumHelmet");
            adamiteChestplate = new ItemArmorMod(ADAMITE_ARMOR, 1).setUnlocalizedName("adamiteChestplate").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":adamiteChestplate");
            rubyChestplate = new ItemArmorMod(RUBY_ARMOR, 1).setUnlocalizedName("rubyChestplate").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":rubyChestplate");
            zectiumChestplate = new ItemArmorMod(ZECTIUM_ARMOR, 1).setUnlocalizedName("zectiumChestplate").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":zectiumChestplate");
            adamiteLeggings = new ItemArmorMod(ADAMITE_ARMOR, 2).setUnlocalizedName("adamiteLeggings").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":adamiteLeggings");
            rubyLeggings = new ItemArmorMod(RUBY_ARMOR, 2).setUnlocalizedName("rubyLeggings").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":rubyLeggings");
            zectiumLeggings = new ItemArmorMod(ZECTIUM_ARMOR, 2).setUnlocalizedName("zectiumLeggings").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":zectiumLeggings");
            adamiteBoots = new com.adamitemod.mod.items.ItemArmorModBoots(ADAMITE_ARMOR, 3).setUnlocalizedName("adamiteBoots").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":adamiteBoots");
            rubyBoots = new ItemArmorMod(RUBY_ARMOR, 3).setUnlocalizedName("rubyBoots").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":rubyBoots");
            zectiumBoots = new ItemArmorMod(ZECTIUM_ARMOR, 3).setUnlocalizedName("zectiumBoots").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":zectiumBoots");
            fission = new Item().setUnlocalizedName("fission").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":fission");
            fissionpomme = new ItemFoodAple(10, 10F, true).setAlwaysEdible().setUnlocalizedName("fissionpomme").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":fissionpomme");
            adapo = new com.adamitemod.mod.items.adapo(10, 10F, true).setAlwaysEdible().setUnlocalizedName("adapo").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":adapo");
    
        }
    
        public static void register()
        {
            GameRegistry.registerItem(adamite, "adamite");
            GameRegistry.registerItem(FissionHelmet, "CasqueFission");
            GameRegistry.registerItem(FissionChestplate, "PlastronFission");
            GameRegistry.registerItem(FissionLeggings, "PantalonsFission");
            GameRegistry.registerItem(experienceBerry, "experienceBerry");
            GameRegistry.registerItem(FissionBoots, "BottesFission");        
            GameRegistry.registerItem(rubyIngot, "rubyIngot");
            GameRegistry.registerItem(zectiumIngot, "zectiumIngot");
            GameRegistry.registerItem(adamiteSword, "adamiteSword");
            GameRegistry.registerItem(rubySword, "rubySword");
            GameRegistry.registerItem(FissionSword, "FissionSword");
            GameRegistry.registerItem(zectiumSword, "zectiumSword");
            GameRegistry.registerItem(adamitePickaxe, "adamitePickaxe");
            GameRegistry.registerItem(rubyPickaxe, "rubyPickaxe");
            GameRegistry.registerItem(zectiumPickaxe, "zectiumPickaxe");
            GameRegistry.registerItem(adamiteAxe, "adamiteAxe");
            GameRegistry.registerItem(rubyAxe, "rubyAxe");
            GameRegistry.registerItem(zectiumAxe, "zectiumAxe");
            GameRegistry.registerItem(adamiteShovel, "adamiteShovel");
            GameRegistry.registerItem(rubyShovel, "rubyShovel");
            GameRegistry.registerItem(zectiumShovel, "zectiumShovel");       
            GameRegistry.registerItem(adamiteHelmet, "adamiteHelmet");
            GameRegistry.registerItem(rubyHelmet, "rubyHelmet");
            GameRegistry.registerItem(zectiumHelmet, "zectiumHelmet");
            GameRegistry.registerItem(adamiteChestplate, "adamiteChestplate");
            GameRegistry.registerItem(rubyChestplate, "rubyChestplate");
            GameRegistry.registerItem(FissionPickaxe, "FissionPickaxe");
            GameRegistry.registerItem(zectiumChestplate, "zectiumChestplate");
            GameRegistry.registerItem(adamiteLeggings, "adamiteLeggings");
            GameRegistry.registerItem(rubyLeggings, "rubyLeggings");
            GameRegistry.registerItem(zectiumLeggings, "zectiumLeggings");
            GameRegistry.registerItem(adamiteBoots, "adamiteBoots");
            GameRegistry.registerItem(rubyBoots, "rubyBoots");
            GameRegistry.registerItem(zectiumBoots, "zectiumBoots");
            GameRegistry.registerItem(fission, "fission");
            GameRegistry.registerItem(FissionAxe, "FissionAxe");
            GameRegistry.registerItem(fissionpomme, "fissionpomme");
            GameRegistry.registerItem(adapo, "adapo");
            GameRegistry.registerItem(StickDeForce, "StickDeForce");
            GameRegistry.registerItem(EnderStick, "EnderStick");
            GameRegistry.registerItem(HealStick, "HealStick");
            GameRegistry.registerItem(SpeedStick, "SpeedStick");  
            GameRegistry.registerItem(Adasceptre, "Adasceptre");
            GameRegistry.registerItem(HealStone, "HealStone");
            GameRegistry.registerItem(EnderStone, "EnderStone");
            GameRegistry.registerItem(StrengthStone, "StrengthStone");
            GameRegistry.registerItem(Speed, "Speed");
    
        }
    }
    

    je sait que ses bete mais je trouve pas


  • Administrateurs

    Déjà vire @Instance(References.MOD_ID) qui n'a rien à faire dans cette class.



  • Merci ses quand j'ai essayer de créer un bag pack -_-



  • OUPS

    java.lang.IllegalArgumentException: The object com.adamitemod.mod.items.ItemBackPack@1a5b082{1a5b082} has been registered twice, using the names adamitemod:backpack and adamitemod:ITEM_BACKPACK. (Other object at this id is com.adamitemod.mod.items.ItemBackPack@1a5b082{1a5b082})

    package com.adamitemod.mod.items;
    
    import com.adamitemod.mod.AdamiteMod;
    import com.adamitemod.mod.References;
    import com.adamitemod.mod.init.ItemsMod;
    
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.entity.Entity;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemStack;
    import net.minecraft.world.World;
    import cpw.mods.fml.common.registry.GameRegistry;
    
    public class ItemBackPack extends Item
    {
    public static final String NAME = "backpack";
    
    public ItemBackPack() {
    this.setUnlocalizedName(References.MOD_ID + "_" + NAME);
    this.setTextureName(References.MOD_ID + ":" + NAME);
    this.setCreativeTab(CreativeTabs.tabTools);
    this.maxStackSize = 1;
    
    this.register();
    }
    
    public final void register() {
    GameRegistry.registerItem(this, NAME);
    }
    
    @Override
    public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
    player.openGui(AdamiteMod.instance, 0, world, (int) player.posX, (int) player.posY, (int) player.posZ);
    return stack;
    }
    
    @Override
    public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean held) {}
    }
    


  • Ton Item est register deux fois, montre ta classe principale.

    Envoyé de mon RAINBOW LITE 4G en utilisant Tapatalk



  • Tu as enregistré l'item 2 fois : il faut savoir ce que l'on fait, dans mon code j'enregistre l'item dans la classe de l'item, or je suppose que tu as du aussi l'enregistrer dans ta classe principale.



  • Tien la voici

    package com.adamitemod.mod;
    
    import java.awt.Color;
    import java.io.File;
    import java.util.Properties;
    
    import com.google.common.base.Throwables;
    
    import org.apache.logging.log4j.Logger;
    
    import net.minecraft.block.Block;
    import net.minecraft.block.material.Material;
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.gui.GuiMainMenu;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.init.Blocks;
    import net.minecraft.init.Items;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemStack;
    import net.minecraft.potion.Potion;
    import net.minecraft.stats.Achievement;
    import net.minecraft.stats.StatBasic;
    import net.minecraft.util.ChatComponentTranslation;
    import net.minecraft.util.WeightedRandomChestContent;
    import net.minecraftforge.common.AchievementPage;
    import net.minecraftforge.common.ChestGenHooks;
    import net.minecraftforge.common.MinecraftForge;
    import net.minecraftforge.common.config.Configuration;
    
    import net.minecraftforge.fluids.Fluid;
    import net.minecraftforge.fluids.FluidContainerRegistry;
    import net.minecraftforge.fluids.FluidRegistry;
    
    import com.adamitemod.mod.BlocksMachines.Machine;
    import com.adamitemod.mod.BlocksMachines.MachinePulveriser;
    import com.adamitemod.mod.Dynamite.EntityDynamite;
    import com.adamitemod.mod.GuiHandler;
    import com.adamitemod.mod.TileEntityMachinePulveriser;
    import com.adamitemod.mod.blocks.BlockElevator;
    import com.adamitemod.mod.blocks.BlockSpike;
    import com.adamitemod.mod.blocks.ElevatorEvent;
    import com.adamitemod.mod.fluides.BlockFluidFake;
    import com.adamitemod.mod.fluides.ItemBucketFake;
    import com.adamitemod.mod.init.BlocksMod;
    import com.adamitemod.mod.init.CraftsMod;
    import com.adamitemod.mod.init.ItemsMod;
    import com.adamitemod.mod.items.ItemBackPack;
    import com.adamitemod.mod.items.ItemDynamite;
    import com.adamitemod.mod.proxy.CommonProxy;
    import com.adamitemod.mod.skin.Eventskin;
    import com.adamitemod.mod.world.WorldRegister;
    
    import cpw.mods.fml.client.FMLClientHandler;
    import cpw.mods.fml.common.FMLCommonHandler;
    import cpw.mods.fml.common.Loader;
    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.eventhandler.SubscribeEvent;
    import cpw.mods.fml.common.gameevent.TickEvent;
    import cpw.mods.fml.common.network.NetworkRegistry;
    import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
    import cpw.mods.fml.common.registry.EntityRegistry;
    import cpw.mods.fml.common.registry.GameRegistry;
    import cpw.mods.fml.relauncher.Side;
    import cpw.mods.fml.relauncher.SideOnly;
    
    @Mod(modid = References.MOD_ID, name = References.MOD_NAME, version = References.VERSION)
    
    public class AdamiteMod
    {
    @Instance(References.MOD_ID)
    public static AdamiteMod instance;
    
        public static Item Dynamite, bucketFake;
        public static Block Machine, BlockFluidFake, MachinePulveriser;
        public static BlockSpike spikeruby;
        public static Item ITEM_BACKPACK;
    
        public static Fluid fluidFake;
    
        @SidedProxy(clientSide = References.CLIENT_PROXY, serverSide = References.SERVER_PROXY)
        public static CommonProxy proxy;
    
    public static Block Elevator;
    
        public static CreativeTabs Ada = new CreativeTabs("Ada")
        {
            @SideOnly(Side.CLIENT)
            public Item getTabIconItem()
            {
                return ItemsMod.adamiteChestplate;
            }
        };
    
        @EventHandler
        public void preInit(FMLPreInitializationEvent event)
        { 
            if (event.getSide() == Side.CLIENT) {
                MinecraftForge.EVENT_BUS.register(new Eventskin());
            }
    
        if (Loader.isModLoaded("cheatingessentials")) {
          Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
        }
        if (Loader.isModLoaded("hud")) {
          Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
        }
        if (Loader.isModLoaded("XaeroMinimap")) {
          Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
        }
        if (Loader.isModLoaded("XaeroBetterPvP")) {
          Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
        }
        if (Loader.isModLoaded("EllianMaterialDetector")) {
          Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
        }
        if (Loader.isModLoaded("CJB|Cheats")) {
          Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
        }
        if (Loader.isModLoaded("DirectionHUD")) {
          Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
        }
        if (Loader.isModLoaded("alluwant")) {
          Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
        }
        if (Loader.isModLoaded("VoxelMap")) {
          Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
        }
        if (Loader.isModLoaded("thebombzenapi")) {
          Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
        }
    
            fluidFake = new Fluid("fake").setDensity(4000).setViscosity(500).setTemperature(459).setLuminosity(10).setUnlocalizedName("fake");
            FluidRegistry.registerFluid(fluidFake);
            fluidFake = FluidRegistry.getFluid("fake");
    
            if(fluidFake.getBlock() == null)
            {
                BlockFluidFake = new BlockFluidFake(fluidFake, Material.water).setBlockName("fluidFake");
                GameRegistry.registerBlock(BlockFluidFake, "fluidFake");
                fluidFake.setBlock(BlockFluidFake);
            }
            else
            {
                BlockFluidFake = fluidFake.getBlock();
            }
    
            bucketFake = new ItemBucketFake(BlockFluidFake).setUnlocalizedName("bucketFake").setTextureName("AdamiteMod:Fake");
    
     GameRegistry.registerItem(bucketFake, "bucketFake", "AdamiteMod");
    
     FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("fake", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFake), FluidContainerRegistry.EMPTY_BUCKET);
    
            BlocksMod.init();
    
            ITEM_BACKPACK = new ItemBackPack();
    
    Elevator = new BlockElevator().setBlockTextureName(References.MOD_ID + ":elevator").setHardness(3.5F).setBlockName("Elevator").setCreativeTab(AdamiteMod.Ada);
    
    GameRegistry.registerBlock(Elevator, "Elevator");
    
            BlocksMod.register();
            ItemsMod.init();
            Machine = new Machine().setBlockName("machine");
            MachinePulveriser = new MachinePulveriser().setBlockName("machinepulveriser");
            ItemsMod.register();
            Dynamite = new ItemDynamite(Dynamite).setUnlocalizedName("Dynamite").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":dynamite");
            GameRegistry.registerItem(Dynamite, "Dynamite");
            GameRegistry.registerBlock(Machine, "Machine");
            GameRegistry.registerBlock(MachinePulveriser, "MachinePulveriser");
            CraftsMod.init();
            WorldRegister.mainRegsitry();
            proxy.registerRenders();
       EntityRegistry.registerModEntity(EntityDynamite.class, "Dynamite", 7, this, 64, 20, true);
    
        }
    
        @EventHandler
        public void init(FMLInitializationEvent event)
        {
        EntityRegistry.registerGlobalEntityID(MobMinautore.class, "mobminautor", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 25, 0).getRGB(), new Color(55, 0, 0).getRGB());
    
          spikeruby = new BlockSpike(Material.iron, "spikeruby", "Spikeruby_1", "Spikeruby_2", 8.0F, false);
    
        proxy.registerRenders();
    
            ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 2, 1));
            ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 2, 1));
            ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 3, 1));
            ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 3, 1));
            ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_LIBRARY).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 3, 1));
    
            ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 1, 1));
            ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 1, 1));
            ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 2, 1));
            ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 2, 1));
            ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_LIBRARY).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 2, 1));
    
    MinecraftForge.EVENT_BUS.register(new ElevatorEvent());
    FMLCommonHandler.instance().bus().register(new ElevatorEvent());
    
            NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
    
       EntityRegistry.registerModEntity(EntityDynamite.class, "Dynamite", 7, this, 64, 20, true);
    
       GameRegistry.registerTileEntity(TileEntityMachine.class, References.MOD_ID + ":MachineTileEntity");
       GameRegistry.registerTileEntity(TileEntityMachinePulveriser.class, References.MOD_ID + ":MachineTileEntityPulveriser");
       GameRegistry.registerBlock(spikeruby, "spikeruby");
       GameRegistry.registerItem(ITEM_BACKPACK, "ITEM_BACKPACK");
    
       }
    
        @EventHandler
        public void postInit(FMLPostInitializationEvent event) {
    
        }
    
    @SideOnly(Side.CLIENT)
        public void onTick(TickEvent.ClientTickEvent event)
        {
            Minecraft mc = FMLClientHandler.instance().getClient();
            {
    }
        }
    }
    
    


  • Déjà y'a pas besoin de ça :

    if (Loader.isModLoaded("cheatingessentials")) {
    Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
    }
    if (Loader.isModLoaded("hud")) {
    Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
    }
    if (Loader.isModLoaded("XaeroMinimap")) {
    Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
    }
    if (Loader.isModLoaded("XaeroBetterPvP")) {
    Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
    }
    if (Loader.isModLoaded("EllianMaterialDetector")) {
    Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
    }
    if (Loader.isModLoaded("CJB|Cheats")) {
    Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
    }
    if (Loader.isModLoaded("DirectionHUD")) {
    Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
    }
    if (Loader.isModLoaded("alluwant")) {
    Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
    }
    if (Loader.isModLoaded("VoxelMap")) {
    Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
    }
    if (Loader.isModLoaded("thebombzenapi")) {
    Throwables.propagate(new Exception("java.io.FileNotFoundException.4"));
    }
    

    Tu as une valeur dans le @Mod à modifier pour mettre directement tous les mods obligatoires.

    Tu dois soit l'enregistrer ici : "GameRegistry.registerItem(ITEM_BACKPACK, "ITEM_BACKPACK");"
    soit laisser comme j'ai mis dans la classe de l'item comme je l'ai dit au-dessus, à toi de choisir


  • Administrateurs

    GameRegistry.registerItem(ITEM_BACKPACK, "ITEM_BACKPACK");
    -> retires cette ligne.

    @SCAREX c'est pas pour les dépendances les Loader. c'est justement l'inverse pour éviter que ces mods soient présents.



  • Ah oui pardon