Résolu Crash depuis essaie de génération de minerai
-
Salut ! Je poste ici car j’ai un petit problème ;/ Mon jeu crash au lancement depuis que j’ai essayé de générer un minerai ! Mais il n’y a aucune erreur sur eclipse donc je vous envois les logs !
:::–-- Minecraft Crash Report ---- // I blame Dinnerbone. Time: 12/07/15 14:55 Description: Initializing game java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.Character at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:209) at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:250) at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:245) at com.heartshadow.mod.HSMOD.init(HSMOD.java:88) 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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) 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 cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) 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 cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) at cpw.mods.fml.common.Loader.initializeMods(Loader.java:737) at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311) at net.minecraft.client.Minecraft.startGame(Minecraft.java:597) at net.minecraft.client.Minecraft.run(Minecraft.java:942) at net.minecraft.client.main.Main.main(Main.java:164) 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 net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:209) at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:250) at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:245) at com.heartshadow.mod.HSMOD.init(HSMOD.java:88) 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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) 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 cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) 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 cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) at cpw.mods.fml.common.Loader.initializeMods(Loader.java:737) at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311) at net.minecraft.client.Minecraft.startGame(Minecraft.java:597) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:942) at net.minecraft.client.main.Main.main(Main.java:164) 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 net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_45, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 823848832 bytes (785 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1490 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHI mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHI FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1490-1.7.10.jar) UCHI Forge{10.13.4.1490} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1490-1.7.10.jar) UCHE hsmod{1.0.0} [HeartShadow MOD] (bin) GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.4.13283 Compatibility Profile Context 14.501.1003.0' Renderer: 'AMD Radeon HD 7000 series' Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: AMD Radeon HD 7000 series GL version 4.4.13283 Compatibility Profile Context 14.501.1003.0, ATI Technologies Inc. GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1)
En espérant que vous pourrez m’aider
PS: Si vous avez besoin de plus de chose, n’hésitez pas !
- Vhake
:::
- Vhake
-
Le problème ne vient pas du tout de la génération de minerai, le problème vient de test crafts. Envoi ta classe principale.
-
D’accord, la voici !
:::
package com.heartshadow.mod; import com.heartshadow.mod.blocks.OreDelda; import com.heartshadow.mod.items.ItemArkan; import com.heartshadow.mod.items.ItemDeldarium; import com.heartshadow.mod.proxy.CommonProxy; import com.heartshadow.mod.tools.ItemDeldaAxe; import com.heartshadow.mod.tools.ItemDeldaHoe; import com.heartshadow.mod.tools.ItemDeldaPickaxe; import com.heartshadow.mod.tools.ItemDeldaShovel; import com.heartshadow.mod.tools.ItemDeldaSword; import com.heartshadow.mod.world.DeldaGenerator; 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; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.EnumHelper; @Mod(modid = "hsmod", name = "HeartShadow MOD", version = "1.0.0") public class HSMOD { @Instance("hsmod") public static HSMOD instance; public static final String MODID = "hsmod"; public static CreativeTabs HSCreativeTabs = new HSCreativeTabs("HSCreativeTabs"); DeldaGenerator DeldaGenerator = new DeldaGenerator(); //Deldarium public static Item itemDeldarium; public static Item swordDelda, pickaxeDelda, axeDelda, shovelDelda, hoeDelda; public static ToolMaterial toolDelda = EnumHelper.addToolMaterial("toolDelda", 2, 1374, 7.0F, 5.0F, 9); public static Block oreDelda; //Arkanite public static Item itemArkan; @SidedProxy(clientSide = "com.heartshadow.mod.proxy.ClientProxy", serverSide = "com.heartshadow.mod.proxy.CommonProxy") public static CommonProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event) { GameRegistry.registerWorldGenerator(new DeldaGenerator(), 0); //Deldarium swordDelda = new ItemDeldaSword(toolDelda).setUnlocalizedName("sworddelda").setTextureName(HSMOD.MODID + ":sworddelda").setCreativeTab(HSMOD.HSCreativeTabs); GameRegistry.registerItem(swordDelda, "item_delda_sword"); pickaxeDelda = new ItemDeldaPickaxe(toolDelda).setUnlocalizedName("pickaxedelda").setTextureName(HSMOD.MODID + ":pickaxedelda").setCreativeTab(HSMOD.HSCreativeTabs); GameRegistry.registerItem(pickaxeDelda, "item_delda_pickaxe"); axeDelda = new ItemDeldaAxe(toolDelda).setUnlocalizedName("axedelda").setTextureName(HSMOD.MODID + ":axedelda").setCreativeTab(HSMOD.HSCreativeTabs); GameRegistry.registerItem(axeDelda, "item_delda_axe"); shovelDelda = new ItemDeldaShovel(toolDelda).setUnlocalizedName("shoveldelda").setTextureName(HSMOD.MODID + ":shoveldelda").setCreativeTab(HSMOD.HSCreativeTabs); GameRegistry.registerItem(shovelDelda, "item_delda_shovel"); hoeDelda = new ItemDeldaHoe(toolDelda).setUnlocalizedName("hoedelda").setTextureName(HSMOD.MODID + ":hoedelda").setCreativeTab(HSMOD.HSCreativeTabs); GameRegistry.registerItem(hoeDelda, "item_delda_hoe"); itemDeldarium = new ItemDeldarium().setUnlocalizedName("deldarium").setTextureName(HSMOD.MODID + ":deldarium").setCreativeTab(HSMOD.HSCreativeTabs); GameRegistry.registerItem(itemDeldarium, "item_deldarium"); oreDelda = new OreDelda(Material.rock).setBlockName("oredelda").setBlockTextureName(HSMOD.MODID + ":oredelda").setCreativeTab(HSMOD.HSCreativeTabs); GameRegistry.registerBlock(oreDelda, "ore_delda"); //Arkanite itemArkan = new ItemArkan().setUnlocalizedName("arkanite").setTextureName(HSMOD.MODID + ":arkanite").setCreativeTab(HSMOD.HSCreativeTabs); GameRegistry.registerItem(itemArkan, "item_arkanite"); } @EventHandler public void init(FMLInitializationEvent event) { proxy.registerRender(); ///Deldarium GameRegistry.addRecipe(new ItemStack(swordDelda, 1), true, new Object[] {"X", "X", "Z", 'X', itemDeldarium, 'Z', Items.stick}); GameRegistry.addRecipe(new ItemStack(pickaxeDelda, 1), true, new Object[] {"XXX", " Z ", " Z ", 'X', itemDeldarium, 'Z', Items.stick}); GameRegistry.addRecipe(new ItemStack(axeDelda, 1), true, new Object[] {"XXX", "XZX", " Z ", 'X', itemDeldarium, 'Z', Items.stick}); GameRegistry.addRecipe(new ItemStack(shovelDelda, 1), true, new Object[] {"X", "Z", "Z", 'X', itemDeldarium, 'Z', Items.stick}); GameRegistry.addRecipe(new ItemStack(hoeDelda, 1), true, new Object[] {"XX ", " Z ", " Z ", 'X', itemDeldarium, 'Z', Items.stick}); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } }
:::
Merci de la réponse ultra rapide !
-
Pourquoi y a t-il un “true” dans le gameRegistry.addRecipe ? Retire-le, il n’a rien à faire ici.
-
Merci !!! ça marche ! J’ai mis true car j’ai vu ça dans un tuto sur youtube. Merci énormément !!
-
Regarde plutôt les tutoriels sur le forum. Eux sont sûrs au moins.