Résolu Probleme Crash Report
-
Hey !
J ai un probleme de crash et je ne sais pas laire les crash reports donc pour ceux quoi pourrait m aider svp PS: si vous voulez des details au niveau des class contactez moi !![URGENT]
Merci d avance :–-- Minecraft Crash Report ---- // Why did you do that? Time: 10/12/17 14:15 Description: There was a severe problem during mod loading that has caused the game to fail net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from FRMod (frmod) Caused by: java.lang.NoClassDefFoundError: com/FRMG/FRM/init/blocks/ores/ChromiumOre at com.FRMG.FRM.proxy.CommonProxy.init(CommonProxy.java:14) at com.FRMG.FRM.proxy.ClientProxy.init(ClientProxy.java:13) at com.FRMG.FRM.FRMod.init(FRMod.java:42) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:602) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:243) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:221) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:145) at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:795) at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:324) at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) at net.minecraft.client.Minecraft.run(Minecraft.java:386) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) Caused by: java.lang.ClassNotFoundException: com.FRMG.FRM.init.blocks.ores.ChromiumOre at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 46 more Caused by: java.lang.NullPointerException at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ... 48 more
Et aussi si vous voyez des logs de Xray c est pour tester ma generation de mineraix qui ne marche pas non plus mais je vais fixer ca !
-
Déjà, jamais de majuscule dans les packages.
Ensuite, montre les classes CommonProxy, ClientProxy et FRMod. -
package com.FRMG.FRM.proxy; import com.FRMG.FRM.init.ModBlocks; import com.FRMG.FRM.init.ModItems; public class CommonProxy { public void preInit() { new ModItems(); } public void init() { new ModBlocks(); } }
package com.FRMG.FRM.proxy; import com.FRMG.FRM.init.tileentity.TileEntitySeedCreator; import net.minecraftforge.fml.client.registry.ClientRegistry; public class ClientProxy extends CommonProxy { @Override public void init() { super.init(); } @Override public void preInit() { super.preInit(); } }
package com.FRMG.FRM; import com.FRMG.FRM.init.ModItems; import com.FRMG.FRM.proxy.CommonProxy; import com.FRMG.FRM.utils.References; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @Mod(modid = References.MOD_ID, name = References.MOD_NAME, version = References.VERSION) public class FRMod { @SidedProxy(clientSide = References.CLIENT_PROXY, serverSide = References.SERVER_PROXY) public static CommonProxy proxy; @Mod.Instance(References.MOD_ID) public static FRMod instance; public static String frmod; @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { proxy.preInit(); } @Mod.EventHandler public void init(FMLInitializationEvent event) { proxy.init(); } };
-
Déjà, les blocs et items doivent être en preInit.
Ensuite, peux-tu montrer ModItems et ModBlocks ? -
package com.FRMG.FRM.init; import com.FRMG.FRM.FRMod; import com.FRMG.FRM.init.armor.chromium.ChromiumBoots; import com.FRMG.FRM.init.armor.chromium.ChromiumChestplate; import com.FRMG.FRM.init.armor.chromium.ChromiumHelmet; import com.FRMG.FRM.init.armor.chromium.ChromiumLeggings; import com.FRMG.FRM.init.armor.lentium.lentiumBoots; import com.FRMG.FRM.init.armor.lentium.lentiumChestplate; import com.FRMG.FRM.init.armor.lentium.lentiumHelmet; import com.FRMG.FRM.init.armor.lentium.lentiumLeggings; import com.FRMG.FRM.init.items.cookedCrocodile; import com.FRMG.FRM.init.items.cookedHorse; import com.FRMG.FRM.init.items.crocodile; import com.FRMG.FRM.init.items.horseRaw; import com.FRMG.FRM.init.items.lentiumSword; import com.FRMG.FRM.other.TabFRMod; import com.FRMG.FRM.utils.References; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.init.SoundEvents; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class ModItems { public ModItems() { initItems(); registerItems(); registerRenders(); } public static Item chromium_ingot; public static Item chromium_stick; public static Item chromium_compressed_ingot; public static Item chromium_powder; public static Item chromium_locked; public static Item chromium_helmet; public static Item chromium_chestplate; public static Item chromium_leggings; public static Item chromium_boots; public Item crocodile, cooked_crocodile, horse_raw, cooked_horse, lentium_helmet, lentium_chestplate, lentium_leggings, lentium_boots; public Item chromium_seed; public void initItems() { //Chromium chromium_ingot = new Item().setRegistryName("chromium_ingot").setUnlocalizedName("chromium_ingot").setCreativeTab(TabFRMod.INSTANCE); chromium_stick = new Item().setRegistryName("chromium_stick").setUnlocalizedName("chromium_stick").setCreativeTab(TabFRMod.INSTANCE); chromium_compressed_ingot = new Item().setRegistryName("chromium_compressed_ingot").setUnlocalizedName("chromium_compressed_ingot").setCreativeTab(TabFRMod.INSTANCE) ; chromium_powder = new Item().setRegistryName("chromium_powder").setUnlocalizedName("chromium_powder").setCreativeTab(TabFRMod.INSTANCE); chromium_locked = new Item().setRegistryName("chromium_locked").setUnlocalizedName("chromium_locked").setCreativeTab(TabFRMod.INSTANCE); chromium_seed = new Item().setRegistryName("chromium_seed").setUnlocalizedName("chromium_seed").setCreativeTab(TabFRMod.INSTANCE); //ArmorLentium lentium_helmet = new lentiumHelmet("lentium_helmet", ArmorMaterials.lentiumMat, 2, EntityEquipmentSlot.HEAD).setCreativeTab(TabFRMod.INSTANCE); lentium_chestplate = new lentiumChestplate("lentium_chestplate", ArmorMaterials.lentiumMat, 2,EntityEquipmentSlot.CHEST).setCreativeTab(TabFRMod.INSTANCE); lentium_leggings = new lentiumLeggings("lentium_leggings", ArmorMaterials.lentiumMat, 2,EntityEquipmentSlot.LEGS).setCreativeTab(TabFRMod.INSTANCE); lentium_boots = new lentiumBoots("lentium_boots", ArmorMaterials.lentiumMat, 2,EntityEquipmentSlot.FEET).setCreativeTab(TabFRMod.INSTANCE); //ArmorChromium chromium_helmet = new ChromiumHelmet("chromium_helmet", ArmorMaterials.chromiumMat, 2, EntityEquipmentSlot.HEAD).setCreativeTab(TabFRMod.INSTANCE); chromium_chestplate = new ChromiumChestplate("chromium_chestplate", ArmorMaterials.chromiumMat, 2, EntityEquipmentSlot.CHEST).setCreativeTab(TabFRMod.INSTANCE); chromium_leggings = new ChromiumLeggings("chromium_leggings", ArmorMaterials.chromiumMat, 2, EntityEquipmentSlot.LEGS).setCreativeTab(TabFRMod.INSTANCE); chromium_boots = new ChromiumBoots("chromium_boots", ArmorMaterials.chromiumMat, 2, EntityEquipmentSlot.FEET).setCreativeTab(TabFRMod.INSTANCE); //Foods crocodile = new crocodile().setRegistryName("crocodile").setUnlocalizedName("crocodile").setCreativeTab(TabFRMod.INSTANCE); cooked_crocodile = new cookedCrocodile().setRegistryName("cooked_crocrodile").setUnlocalizedName("cooked_crocodile").setCreativeTab(TabFRMod.INSTANCE); horse_raw = new horseRaw().setRegistryName("horse_raw").setUnlocalizedName("horse_raw").setCreativeTab(TabFRMod.INSTANCE); cooked_horse = new cookedHorse().setCreativeTab(TabFRMod.INSTANCE); } public void registerItems() { registerItem(chromium_ingot); registerItem(chromium_stick); registerItem(chromium_compressed_ingot); registerItem(chromium_powder); registerItem(chromium_locked); registerItem(chromium_helmet); registerItem(chromium_chestplate); registerItem(chromium_leggings); registerItem(chromium_boots); registerItem(crocodile); registerItem(cooked_crocodile); registerItem(horse_raw); registerItem(cooked_horse); registerItem(lentium_helmet); registerItem(lentium_chestplate); registerItem(lentium_leggings); registerItem(lentium_boots); registerItem(chromium_seed); } @SideOnly(Side.CLIENT) public void registerRenders() { registerRender(chromium_ingot, 0); registerRender(chromium_stick, 0); registerRender(chromium_compressed_ingot, 0); registerRender(chromium_powder, 0); registerRender(chromium_locked, 0); registerRender(chromium_helmet, 0); registerRender(chromium_chestplate, 0); registerRender(chromium_leggings, 0); registerRender(chromium_boots, 0); registerRender(crocodile, 0); registerRender(cooked_crocodile, 0); registerRender(horse_raw, 0); registerRender(cooked_horse, 0); registerRender(lentium_helmet, 0); registerRender(lentium_chestplate, 0); registerRender(lentium_leggings, 0); registerRender(lentium_boots, 0); registerRender(chromium_seed, 0); } private void registerItem(Item item) { GameRegistry.register(item); } private void registerRender(Item item, int meta) { ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(new ResourceLocation(References.MOD_ID, item.getUnlocalizedName().substring(5)),"inventory")); } public static class ArmorMaterials { public static final ItemArmor.ArmorMaterial chromiumMat = EnumHelper.addArmorMaterial("chromiumMat",References.MOD_ID + ":chromiumarmor", 70, new int []{6, 9, 8, 5}, 10,SoundEvents.ITEM_ARMOR_EQUIP_IRON, 0.0F); public static final ItemArmor.ArmorMaterial lentiumMat = EnumHelper.addArmorMaterial("lentiumMat", References.MOD_ID + ":lentiumarmor", 33, new int[]{4, 9, 7, 4}, 10, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 2.0F); } }
package com.FRMG.FRM.init; import com.FRMG.FRM.FRMod; import com.FRMG.FRM.init.blocks.BlockSeedCreator; import com.FRMG.FRM.init.blocks.ores.ChromiumOre; import com.FRMG.FRM.init.tileentity.TileEntitySeedCreator; import com.FRMG.FRM.utils.References; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class ModBlocks { public ModBlocks() { init(); registers(); registerItemBlocks(); registerRenders(); } public static Block rainbow_lamp, compressor, locker, seed_creator, chromium_ore; private void init() { rainbow_lamp = new Block(Material.ICE).setRegistryName("rainbow_lamp").setUnlocalizedName("rainbow_lamp").setLightLevel(1.0F); compressor = new Block(Material.PISTON).setRegistryName("compressor").setUnlocalizedName("compressor"); locker = new Block(Material.PISTON).setRegistryName("locker").setUnlocalizedName("locker"); seed_creator = new BlockSeedCreator().setRegistryName("seed_creator").setUnlocalizedName("seed_creator"); chromium_ore = new ChromiumOre("chromium_ore", Material.ROCK, 5f, 20f); } private void registers() { register(rainbow_lamp); register(compressor); register(locker); register(seed_creator); register(chromium_ore); } @SideOnly(Side.CLIENT) private void registerRenders() { registerRender(rainbow_lamp, 0); registerRender(compressor, 0); registerRender(locker, 0); registerRender(seed_creator, 0); registerRender(chromium_ore, 0); } private void registerItemBlocks() { registerItemBlock(rainbow_lamp); registerItemBlock(compressor); registerItemBlock(locker); registerItemBlock(seed_creator); registerItemBlock(chromium_ore); } /*…........................................................................................................ */ private void register(Block block) { GameRegistry.register(block); } private void registerRender(Block block, int meta) { ModelLoader.setCustomModelResourceLocation( Item.getItemFromBlock(rainbow_lamp), meta, new ModelResourceLocation( rainbow_lamp.getRegistryName(), "inventory" ) ); ModelLoader.setCustomModelResourceLocation( Item.getItemFromBlock(compressor), meta, new ModelResourceLocation(compressor.getRegistryName(), "inventory" ) ); ModelLoader.setCustomModelResourceLocation( Item.getItemFromBlock(locker), meta, new ModelResourceLocation(locker.getRegistryName(), "inventory" ) ); ModelLoader.setCustomModelResourceLocation( Item.getItemFromBlock(seed_creator), meta, new ModelResourceLocation(seed_creator.getRegistryName(), "inventory" ) ); ModelLoader.setCustomModelResourceLocation( Item.getItemFromBlock(chromium_ore), meta, new ModelResourceLocation(chromium_ore.getRegistryName(), "inventory" ) ); } private void registerItemBlock(Block block) { ItemBlock ib = new ItemBlock(block); ib.setRegistryName(block.getRegistryName()); GameRegistry.register(ib); } }
-
La classe ChromiumOre ne semble pas exister.
-
si la voila :
package com.FRMG.FRM.init.blocks.ores; import com.FRMG.FRM.other.TabFRMod; import net.minecraft.block.Block; import net.minecraft.block.material.Material; public class ChromiumOre extends Block { public ChromiumOre(String name, Material materialIn, float hardness, float resistance) { super(materialIn); this.setRegistryName(name); this.setUnlocalizedName(name); this.setHardness(hardness); this.setResistance(resistance); this.setCreativeTab(TabFRMod.INSTANCE); } }
-
Selon le rapport de crash, non, elle n’existe pas.
Essaies de clean le projet pour qu’eclipse compile à nouveau tout.