I had a crash report. 0 errors are in my code. It works without my mod.
Crash report:
---- Minecraft Crash Report ----<br>// You should try our sister game, Minceraft!</p> <p>Time: 4/24/15 9:39 AM<br>Description: Initializing game</p> <p>java.lang.StringIndexOutOfBoundsException: String index out of range: 8<br> at java.lang.String.charAt(Unknown Source)<br> at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:232)<br> at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:244)<br> at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:239)<br> at com.mod.main.CraftingManager.addCraftingRec(CraftingManager.java:25)<br> at com.mod.main.CraftingManager.mainRegistry(CraftingManager.java:14)<br> at com.mod.main.MainRegistry.PreLoad(MainRegistry.java:28)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)<br> at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)<br> at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)<br> at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)<br> at com.google.common.eventbus.EventBus.post(EventBus.java:275)<br> at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)<br> at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)<br> at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)<br> at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)<br> at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)<br> at com.google.common.eventbus.EventBus.post(EventBus.java:275)<br> at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)<br> at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513)<br> at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)<br> at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)<br> at net.minecraft.client.Minecraft.run(Minecraft.java:931)<br> at net.minecraft.client.main.Main.main(Main.java:164)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)<br> at net.minecraft.launchwrapper.Launch.main(Launch.java:28)<br> at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)<br> at GradleStart.main(Unknown Source)</p> <p> A detailed walkthrough of the error, its code path and all known details is as follows:<br>---------------------------------------------------------------------------------------</p> <p>-- Head --<br>Stacktrace:<br> at java.lang.String.charAt(Unknown Source)<br> at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:232)<br> at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:244)<br> at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:239)<br> at com.mod.main.CraftingManager.addCraftingRec(CraftingManager.java:25)<br> at com.mod.main.CraftingManager.mainRegistry(CraftingManager.java:14)<br> at com.mod.main.MainRegistry.PreLoad(MainRegistry.java:28)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)<br> at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)<br> at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)<br> at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)<br> at com.google.common.eventbus.EventBus.post(EventBus.java:275)<br> at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)<br> at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)<br> at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)<br> at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)<br> at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)<br> at com.google.common.eventbus.EventBus.post(EventBus.java:275)<br> at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)<br> at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513)<br> at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)<br> at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)</p> <p>-- Initialization --<br>Details:<br>Stacktrace:<br> at net.minecraft.client.Minecraft.run(Minecraft.java:931)<br> at net.minecraft.client.main.Main.main(Main.java:164)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)<br> at net.minecraft.launchwrapper.Launch.main(Launch.java:28)<br> at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)<br> at GradleStart.main(Unknown Source)</p> <p>-- System Details --<br>Details:<br> Minecraft Version: 1.7.10<br> Operating System: Windows 8.1 (amd64) version 6.3<br> Java Version: 1.8.0_31, Oracle Corporation<br> Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation<br> Memory: 902213704 bytes (860 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)<br> JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M<br> AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used<br> IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0<br> FML: MCP v9.05 FML v7.10.85.1230 Minecraft Forge 10.13.2.1230 4 mods loaded, 4 mods active<br> mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized<br> FML{7.10.85.1230} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized<br> Forge{10.13.2.1230} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized<br> forge_test_mod{1.2.1} [Forge Test Mod] (bin) Unloaded->Constructed->Errored<br> Launched Version: 1.7.10<br> LWJGL: 2.9.1<br> OpenGL: GeForce GT 750M/PCIe/SSE2 GL version 4.3.0, NVIDIA Corporation<br> GL Caps: Using GL 1.3 multitexturing.<br>Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.<br>Anisotropic filtering is supported and maximum anisotropy is 16.<br>Shaders are available because OpenGL 2.1 is supported.</p> <p>Is Modded: Definitely; Client brand changed to 'fml,forge'<br> Type: Client (map_client.txt)<br> Resource Packs: []<br> Current Language: English (US)<br> Profiler Position: N/A (disabled)<br> Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used<br> Anisotropic Filtering: Off (1)
I had a crash report. 0 errors are in my code. It works without my mod.
Crash report:
---- Minecraft Crash Report ----<br>// You should try our sister game, Minceraft!</p> <p>Time: 4/24/15 9:39 AM<br>Description: Initializing game</p> <p>java.lang.StringIndexOutOfBoundsException: String index out of range: 8<br> at java.lang.String.charAt(Unknown Source)<br> at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:232)<br> at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:244)<br> at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:239)<br> at com.mod.main.CraftingManager.addCraftingRec(CraftingManager.java:25)<br> at com.mod.main.CraftingManager.mainRegistry(CraftingManager.java:14)<br> at com.mod.main.MainRegistry.PreLoad(MainRegistry.java:28)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)<br> at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)<br> at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)<br> at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)<br> at com.google.common.eventbus.EventBus.post(EventBus.java:275)<br> at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)<br> at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)<br> at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)<br> at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)<br> at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)<br> at com.google.common.eventbus.EventBus.post(EventBus.java:275)<br> at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)<br> at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513)<br> at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)<br> at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)<br> at net.minecraft.client.Minecraft.run(Minecraft.java:931)<br> at net.minecraft.client.main.Main.main(Main.java:164)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)<br> at net.minecraft.launchwrapper.Launch.main(Launch.java:28)<br> at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)<br> at GradleStart.main(Unknown Source)</p> <p> A detailed walkthrough of the error, its code path and all known details is as follows:<br>---------------------------------------------------------------------------------------</p> <p>-- Head --<br>Stacktrace:<br> at java.lang.String.charAt(Unknown Source)<br> at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:232)<br> at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:244)<br> at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:239)<br> at com.mod.main.CraftingManager.addCraftingRec(CraftingManager.java:25)<br> at com.mod.main.CraftingManager.mainRegistry(CraftingManager.java:14)<br> at com.mod.main.MainRegistry.PreLoad(MainRegistry.java:28)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)<br> at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)<br> at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)<br> at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)<br> at com.google.common.eventbus.EventBus.post(EventBus.java:275)<br> at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)<br> at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)<br> at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)<br> at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)<br> at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)<br> at com.google.common.eventbus.EventBus.post(EventBus.java:275)<br> at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)<br> at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513)<br> at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)<br> at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)</p> <p>-- Initialization --<br>Details:<br>Stacktrace:<br> at net.minecraft.client.Minecraft.run(Minecraft.java:931)<br> at net.minecraft.client.main.Main.main(Main.java:164)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)<br> at net.minecraft.launchwrapper.Launch.main(Launch.java:28)<br> at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)<br> at GradleStart.main(Unknown Source)</p> <p>-- System Details --<br>Details:<br> Minecraft Version: 1.7.10<br> Operating System: Windows 8.1 (amd64) version 6.3<br> Java Version: 1.8.0_31, Oracle Corporation<br> Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation<br> Memory: 902213704 bytes (860 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)<br> JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M<br> AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used<br> IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0<br> FML: MCP v9.05 FML v7.10.85.1230 Minecraft Forge 10.13.2.1230 4 mods loaded, 4 mods active<br> mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized<br> FML{7.10.85.1230} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized<br> Forge{10.13.2.1230} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized<br> forge_test_mod{1.2.1} [Forge Test Mod] (bin) Unloaded->Constructed->Errored<br> Launched Version: 1.7.10<br> LWJGL: 2.9.1<br> OpenGL: GeForce GT 750M/PCIe/SSE2 GL version 4.3.0, NVIDIA Corporation<br> GL Caps: Using GL 1.3 multitexturing.<br>Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.<br>Anisotropic filtering is supported and maximum anisotropy is 16.<br>Shaders are available because OpenGL 2.1 is supported.</p> <p>Is Modded: Definitely; Client brand changed to 'fml,forge'<br> Type: Client (map_client.txt)<br> Resource Packs: []<br> Current Language: English (US)<br> Profiler Position: N/A (disabled)<br> Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used<br> Anisotropic Filtering: Off (1)
Post your recipes class. At least, that would be my starting place based on your log.
I have conformed that It works without the crafting manager, but my world won't load. I have everything registered in the main registry. You can have a look at my new one.
Crafting manager:
[/p]
[p]package com.mod.main;[/p]
[p]import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;[/p]
[p]import com.mod.blocks.Mblocks;
import com.mod.item.Mitems;[/p]
[p]import cpw.mods.fml.common.registry.GameRegistry;[/p]
[p]public class CraftingManager {
public static void mainRegistry() {
addCraftingRec();
addSmeltingRec ();
}
//Overworld
public static void addCraftingRec() {
//shaped recipes
GameRegistry.addShapedRecipe(new ItemStack(Mblocks.ComStone), new Object[] {"XX", "XX", 'X', Blocks.stone});
GameRegistry.addShapedRecipe(new ItemStack(Blocks.ice, 10), new Object[] {"XXX", "XXX", "XXX", 'X', Blocks.snow});
GameRegistry.addShapedRecipe(new ItemStack(Blocks.command_block), new Object[] {"AAA", "BCB", "AAA", 'A', Blocks.hardened_clay, 'B', Blocks.redstone_torch, 'C', Blocks.redstone_block});
GameRegistry.addShapedRecipe(new ItemStack(Blocks.web, 3), "X X", new Object[] {" X ", "X X", 'X', Items.string});
GameRegistry.addShapedRecipe(new ItemStack(Blocks.sponge, 6), new Object[] {"XXX", "XXX", "XXX", 'X', Blocks.wool});
GameRegistry.addShapedRecipe(new ItemStack(Blocks.farmland), new Object[] {"XX", "XX", 'X', Blocks.dirt});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oAxe), new Object[] {"XX", "X# ", " # ", 'x', Mitems.oIngot, '#', Items.stick});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oBoots), new Object[] {"X X", "X X", 'X', Blocks.dirt});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oSpear), new Object[] {" X", " X ", "X ", 'X', Mitems.ostick});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oSword), new Object[] {"X", "X", "#", 'X', Blocks.dirt, '#', Items.stick});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oPick), new Object[] {"XXX", " # ", " # ", 'X', Mitems.oIngot, '#', Items.stick});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oSpade), new Object[] {"XXX", " # ", " # ", 'X', Mitems.oIngot, '#', Items.stick});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oIngot), new Object[] {"XXX", "XXX", "XXX", 'X', Mitems.oShardPiece});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.ostick), new Object[] {" X", " X ", "X ", 'X', Mitems.oIngot});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oIngot), new Object[] {"X", "X", 'X', Blocks.obsidian});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oHoe), new Object[] {"XXX", " # ", " # ", 'X', Mitems.oIngot, '#', Items.stick});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oLeggings), new Object[] {"XXX", "X X", "X X", 'X', Mitems.oIngot});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oChestplate), new Object[] {"X X", "XXX", "XXX", 'X', Mitems.oIngot});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oHelmet), new Object[] {"XXX", "X X", 'X', Mitems.oIngot});
//shapeless recipes
GameRegistry.addShapelessRecipe(new ItemStack(Items.string, 4), new Object[] {new ItemStack(Blocks.wool)});
}
public static void addSmeltingRec () {
GameRegistry.addSmelting(Mblocks.CopperOre, new ItemStack(Mitems.Copper), 15.0F);
GameRegistry.addSmelting(Mblocks.TopazOre, new ItemStack(Mitems.Topaz), 15.0F);
GameRegistry.addSmelting(Mblocks.CitrineOre, new ItemStack(Mitems.Citrine), 15.0F);
GameRegistry.addSmelting(Mblocks.YttriumOre, new ItemStack(Mitems.Yttrium), 15.0F);
}
}[/p]
[p]
I have conformed that It works without the crafting manager, but my world won't load. I have everything registered in the main registry. You can have a look at my new one.
Crafting manager:
</p> <p>package com.mod.main;</p> <p>import net.minecraft.init.Blocks;<br>import net.minecraft.init.Items;<br>import net.minecraft.item.ItemStack;</p> <p>import com.mod.blocks.Mblocks;<br>import com.mod.item.Mitems;</p> <p>import cpw.mods.fml.common.registry.GameRegistry;</p> <p>public class CraftingManager {<br> public static void mainRegistry() {<br> addCraftingRec();<br> addSmeltingRec ();<br> }<br> //Overworld<br> public static void addCraftingRec() {<br> //shaped recipes<br> GameRegistry.addShapedRecipe(new ItemStack(Mblocks.ComStone), new Object[] {"XX", "XX", 'X', Blocks.stone});<br> GameRegistry.addShapedRecipe(new ItemStack(Blocks.ice, 10), new Object[] {"XXX", "XXX", "XXX", 'X', Blocks.snow});<br> GameRegistry.addShapedRecipe(new ItemStack(Blocks.command_block), new Object[] {"AAA", "BCB", "AAA", 'A', Blocks.hardened_clay, 'B', Blocks.redstone_torch, 'C', Blocks.redstone_block});<br> GameRegistry.addShapedRecipe(new ItemStack(Blocks.web, 3), "X X", new Object[] {" X ", "X X", 'X', Items.string});<br> GameRegistry.addShapedRecipe(new ItemStack(Blocks.sponge, 6), new Object[] {"XXX", "XXX", "XXX", 'X', Blocks.wool});<br> GameRegistry.addShapedRecipe(new ItemStack(Blocks.farmland), new Object[] {"XX", "XX", 'X', Blocks.dirt});<br> GameRegistry.addShapedRecipe(new ItemStack(Mitems.oAxe), new Object[] {"XX", "X# ", " # ", 'x', Mitems.oIngot, '#', Items.stick});<br> GameRegistry.addShapedRecipe(new ItemStack(Mitems.oBoots), new Object[] {"X X", "X X", 'X', Blocks.dirt});<br> GameRegistry.addShapedRecipe(new ItemStack(Mitems.oSpear), new Object[] {" X", " X ", "X ", 'X', Mitems.ostick});<br> GameRegistry.addShapedRecipe(new ItemStack(Mitems.oSword), new Object[] {"X", "X", "#", 'X', Blocks.dirt, '#', Items.stick});<br> GameRegistry.addShapedRecipe(new ItemStack(Mitems.oPick), new Object[] {"XXX", " # ", " # ", 'X', Mitems.oIngot, '#', Items.stick});<br> GameRegistry.addShapedRecipe(new ItemStack(Mitems.oSpade), new Object[] {"XXX", " # ", " # ", 'X', Mitems.oIngot, '#', Items.stick});<br> GameRegistry.addShapedRecipe(new ItemStack(Mitems.oIngot), new Object[] {"XXX", "XXX", "XXX", 'X', Mitems.oShardPiece});<br> GameRegistry.addShapedRecipe(new ItemStack(Mitems.ostick), new Object[] {" X", " X ", "X ", 'X', Mitems.oIngot});<br> GameRegistry.addShapedRecipe(new ItemStack(Mitems.oIngot), new Object[] {"X", "X", 'X', Blocks.obsidian});<br> GameRegistry.addShapedRecipe(new ItemStack(Mitems.oHoe), new Object[] {"XXX", " # ", " # ", 'X', Mitems.oIngot, '#', Items.stick});<br> GameRegistry.addShapedRecipe(new ItemStack(Mitems.oLeggings), new Object[] {"XXX", "X X", "X X", 'X', Mitems.oIngot});<br> GameRegistry.addShapedRecipe(new ItemStack(Mitems.oChestplate), new Object[] {"X X", "XXX", "XXX", 'X', Mitems.oIngot});<br> GameRegistry.addShapedRecipe(new ItemStack(Mitems.oHelmet), new Object[] {"XXX", "X X", 'X', Mitems.oIngot});<br> //shapeless recipes<br> GameRegistry.addShapelessRecipe(new ItemStack(Items.string, 4), new Object[] {new ItemStack(Blocks.wool)});<br> }<br> public static void addSmeltingRec () {<br> GameRegistry.addSmelting(Mblocks.CopperOre, new ItemStack(Mitems.Copper), 15.0F);<br> GameRegistry.addSmelting(Mblocks.TopazOre, new ItemStack(Mitems.Topaz), 15.0F);<br> GameRegistry.addSmelting(Mblocks.CitrineOre, new ItemStack(Mitems.Citrine), 15.0F);<br> GameRegistry.addSmelting(Mblocks.YttriumOre, new ItemStack(Mitems.Yttrium), 15.0F);<br> }<br>}</p> <p>
Please tell me what needs fixing.
2 questions:
1. Can you show us the main class?
2. Do the recipes not load or the mod itself? If it's the recipes, try another world.
Where does it say preInit? How do I change it? Can you please show me exactly where?
preInit is my abbreviation (and should be everyone's) for FMLPreInitializationEvent as a method name. In your case, you have it as preLoad, so move it from that method, to the load method.
preInit is my abbreviation (and should be everyone's) for FMLPreInitializationEvent as a method name. In your case, you have it as preLoad, so move it from that method, to the load method.
What is FMLPreInitializationEvent? Is it the thing in the main class I have? Please make the changes.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumJust click the run button. It's the green button with the play icon in it.
I know that, but where can I find the client and server to run?
I had a crash report. 0 errors are in my code. It works without my mod.
Crash report:
---- Minecraft Crash Report ----<br>// You should try our sister game, Minceraft!</p> <p>Time: 4/24/15 9:39 AM<br>Description: Initializing game</p> <p>java.lang.StringIndexOutOfBoundsException: String index out of range: 8<br> at java.lang.String.charAt(Unknown Source)<br> at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:232)<br> at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:244)<br> at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:239)<br> at com.mod.main.CraftingManager.addCraftingRec(CraftingManager.java:25)<br> at com.mod.main.CraftingManager.mainRegistry(CraftingManager.java:14)<br> at com.mod.main.MainRegistry.PreLoad(MainRegistry.java:28)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)<br> at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)<br> at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)<br> at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)<br> at com.google.common.eventbus.EventBus.post(EventBus.java:275)<br> at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)<br> at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)<br> at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)<br> at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)<br> at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)<br> at com.google.common.eventbus.EventBus.post(EventBus.java:275)<br> at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)<br> at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513)<br> at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)<br> at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)<br> at net.minecraft.client.Minecraft.run(Minecraft.java:931)<br> at net.minecraft.client.main.Main.main(Main.java:164)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)<br> at net.minecraft.launchwrapper.Launch.main(Launch.java:28)<br> at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)<br> at GradleStart.main(Unknown Source)</p> <p> A detailed walkthrough of the error, its code path and all known details is as follows:<br>---------------------------------------------------------------------------------------</p> <p>-- Head --<br>Stacktrace:<br> at java.lang.String.charAt(Unknown Source)<br> at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:232)<br> at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:244)<br> at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:239)<br> at com.mod.main.CraftingManager.addCraftingRec(CraftingManager.java:25)<br> at com.mod.main.CraftingManager.mainRegistry(CraftingManager.java:14)<br> at com.mod.main.MainRegistry.PreLoad(MainRegistry.java:28)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)<br> at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)<br> at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)<br> at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)<br> at com.google.common.eventbus.EventBus.post(EventBus.java:275)<br> at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)<br> at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)<br> at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)<br> at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)<br> at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)<br> at com.google.common.eventbus.EventBus.post(EventBus.java:275)<br> at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)<br> at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513)<br> at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)<br> at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)</p> <p>-- Initialization --<br>Details:<br>Stacktrace:<br> at net.minecraft.client.Minecraft.run(Minecraft.java:931)<br> at net.minecraft.client.main.Main.main(Main.java:164)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br> at java.lang.reflect.Method.invoke(Unknown Source)<br> at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)<br> at net.minecraft.launchwrapper.Launch.main(Launch.java:28)<br> at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)<br> at GradleStart.main(Unknown Source)</p> <p>-- System Details --<br>Details:<br> Minecraft Version: 1.7.10<br> Operating System: Windows 8.1 (amd64) version 6.3<br> Java Version: 1.8.0_31, Oracle Corporation<br> Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation<br> Memory: 902213704 bytes (860 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)<br> JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M<br> AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used<br> IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0<br> FML: MCP v9.05 FML v7.10.85.1230 Minecraft Forge 10.13.2.1230 4 mods loaded, 4 mods active<br> mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized<br> FML{7.10.85.1230} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized<br> Forge{10.13.2.1230} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized<br> forge_test_mod{1.2.1} [Forge Test Mod] (bin) Unloaded->Constructed->Errored<br> Launched Version: 1.7.10<br> LWJGL: 2.9.1<br> OpenGL: GeForce GT 750M/PCIe/SSE2 GL version 4.3.0, NVIDIA Corporation<br> GL Caps: Using GL 1.3 multitexturing.<br>Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.<br>Anisotropic filtering is supported and maximum anisotropy is 16.<br>Shaders are available because OpenGL 2.1 is supported.</p> <p>Is Modded: Definitely; Client brand changed to 'fml,forge'<br> Type: Client (map_client.txt)<br> Resource Packs: []<br> Current Language: English (US)<br> Profiler Position: N/A (disabled)<br> Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used<br> Anisotropic Filtering: Off (1)Post your recipes class. At least, that would be my starting place based on your log.
There's not much in it, but I think it's probably the numbers in the shaped recipes(not shapeless). I want to craft multiple items and not just one.
CraftingManager:
[/p] [p]package com.mod.main;[/p] [p]import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack;[/p] [p]import com.mod.blocks.Mblocks; import com.mod.item.Mitems;[/p] [p]import cpw.mods.fml.common.registry.GameRegistry;[/p] [p]public class CraftingManager { public static void mainRegistry() { addCraftingRec(); addSmeltingRec (); } public static void addCraftingRec() { //shaped recipes GameRegistry.addRecipe(new ItemStack(Mblocks.ComStone), "XX", "XX", 'X', Blocks.stone); GameRegistry.addRecipe(new ItemStack(Blocks.ice, 10), "XXX", "XXX", "XXX", 'X', Blocks.snow); GameRegistry.addRecipe(new ItemStack(Blocks.command_block), "AAA", "BCB", "AAA", 'A', Blocks.hardened_clay, 'B', Blocks.redstone_torch, 'C', Blocks.redstone_block); GameRegistry.addRecipe(new ItemStack(Blocks.web, 3), "X X", " X ", "X X", 'X', Items.string); GameRegistry.addRecipe(new ItemStack(Blocks.sponge, 6), "XXX", "XXX", "XXX", 'X', Blocks.wool); GameRegistry.addRecipe(new ItemStack(Blocks.farmland), "XX", "XX", 'X', Blocks.dirt); GameRegistry.addRecipe(new ItemStack(Mitems.oAxe), "XX", "X# ", " # ", 'x', Mitems.oIngot, '#', Items.stick); GameRegistry.addRecipe(new ItemStack(Mitems.oBoots), "X X", "X X", 'X', Blocks.dirt); GameRegistry.addRecipe(new ItemStack(Mitems.oSpear), " X", " X ", "X ", 'X', Mitems.ostick); GameRegistry.addRecipe(new ItemStack(Mitems.oSword), "X", "X", "#", 'X', Blocks.dirt, '#', Items.stick); GameRegistry.addRecipe(new ItemStack(Mitems.oPick), "XXX", " # ", " # ", 'X', Mitems.oIngot, '#', Items.stick); GameRegistry.addRecipe(new ItemStack(Mitems.oSpade), "XXX", " # ", " # ", 'X', Mitems.oIngot, '#', Items.stick); GameRegistry.addRecipe(new ItemStack(Mitems.oIngot), "XXX", "XXX", "XXX", 'X', Mitems.oShardPiece); GameRegistry.addRecipe(new ItemStack(Mitems.ostick), " X", " X ", "X ", 'X', Mitems.oIngot); GameRegistry.addRecipe(new ItemStack(Mitems.oIngot), "X", "X", 'X', Blocks.obsidian); GameRegistry.addRecipe(new ItemStack(Mitems.oHoe), "XXX", " # ", " # ", 'X', Mitems.oIngot, '#', Items.stick); GameRegistry.addRecipe(new ItemStack(Mitems.oLeggings), "XXX", "X X", "X X", 'X', Mitems.oIngot); GameRegistry.addRecipe(new ItemStack(Mitems.oChestplate), "X X", "XXX", "XXX", 'X', Mitems.oIngot); GameRegistry.addRecipe(new ItemStack(Mitems.oHelmet), "XXX", "X X", 'X', Mitems.oIngot); //shapeless recipes GameRegistry.addShapelessRecipe(new ItemStack(Items.diamond, 1), Blocks.bedrock); GameRegistry.addShapelessRecipe(new ItemStack(Items.string, 4), Blocks.wool); } public static void addSmeltingRec () { GameRegistry.addSmelting(Mblocks.CopperOre, new ItemStack(Mitems.Copper), 15.0F); GameRegistry.addSmelting(Mblocks.TopazOre, new ItemStack(Mitems.Topaz), 15.0F); GameRegistry.addSmelting(Mblocks.CitrineOre, new ItemStack(Mitems.Citrine), 15.0F); GameRegistry.addSmelting(Mblocks.YttriumOre, new ItemStack(Mitems.Yttrium), 15.0F); } }[/p] [p]-
View User Profile
-
View Posts
-
Send Message
Curse PremiumTry addShapedRecipe instead of addRecipe.
Why do you use adfly!? I made zero money with adfly. I find it a scam.
I did and it still doesn't work. I still think the numbers have to be part of it.
Wait! His tutorial shows everything written differently. I didn't have a new object. Can someone please rewrite it correctly. All thanks.
This is working code. It should be universal between 1.7 and 1.8 as well if I'm not mistaken.
So... You can only update your mod to 1.8? Is there a way to code a new mods in 1.8 yet? If no, than I understand.
I have conformed that It works without the crafting manager, but my world won't load. I have everything registered in the main registry. You can have a look at my new one.
Crafting manager:
[/p] [p]package com.mod.main;[/p] [p]import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack;[/p] [p]import com.mod.blocks.Mblocks; import com.mod.item.Mitems;[/p] [p]import cpw.mods.fml.common.registry.GameRegistry;[/p] [p]public class CraftingManager { public static void mainRegistry() { addCraftingRec(); addSmeltingRec (); } //Overworld public static void addCraftingRec() { //shaped recipes GameRegistry.addShapedRecipe(new ItemStack(Mblocks.ComStone), new Object[] {"XX", "XX", 'X', Blocks.stone}); GameRegistry.addShapedRecipe(new ItemStack(Blocks.ice, 10), new Object[] {"XXX", "XXX", "XXX", 'X', Blocks.snow}); GameRegistry.addShapedRecipe(new ItemStack(Blocks.command_block), new Object[] {"AAA", "BCB", "AAA", 'A', Blocks.hardened_clay, 'B', Blocks.redstone_torch, 'C', Blocks.redstone_block}); GameRegistry.addShapedRecipe(new ItemStack(Blocks.web, 3), "X X", new Object[] {" X ", "X X", 'X', Items.string}); GameRegistry.addShapedRecipe(new ItemStack(Blocks.sponge, 6), new Object[] {"XXX", "XXX", "XXX", 'X', Blocks.wool}); GameRegistry.addShapedRecipe(new ItemStack(Blocks.farmland), new Object[] {"XX", "XX", 'X', Blocks.dirt}); GameRegistry.addShapedRecipe(new ItemStack(Mitems.oAxe), new Object[] {"XX", "X# ", " # ", 'x', Mitems.oIngot, '#', Items.stick}); GameRegistry.addShapedRecipe(new ItemStack(Mitems.oBoots), new Object[] {"X X", "X X", 'X', Blocks.dirt}); GameRegistry.addShapedRecipe(new ItemStack(Mitems.oSpear), new Object[] {" X", " X ", "X ", 'X', Mitems.ostick}); GameRegistry.addShapedRecipe(new ItemStack(Mitems.oSword), new Object[] {"X", "X", "#", 'X', Blocks.dirt, '#', Items.stick}); GameRegistry.addShapedRecipe(new ItemStack(Mitems.oPick), new Object[] {"XXX", " # ", " # ", 'X', Mitems.oIngot, '#', Items.stick}); GameRegistry.addShapedRecipe(new ItemStack(Mitems.oSpade), new Object[] {"XXX", " # ", " # ", 'X', Mitems.oIngot, '#', Items.stick}); GameRegistry.addShapedRecipe(new ItemStack(Mitems.oIngot), new Object[] {"XXX", "XXX", "XXX", 'X', Mitems.oShardPiece}); GameRegistry.addShapedRecipe(new ItemStack(Mitems.ostick), new Object[] {" X", " X ", "X ", 'X', Mitems.oIngot}); GameRegistry.addShapedRecipe(new ItemStack(Mitems.oIngot), new Object[] {"X", "X", 'X', Blocks.obsidian}); GameRegistry.addShapedRecipe(new ItemStack(Mitems.oHoe), new Object[] {"XXX", " # ", " # ", 'X', Mitems.oIngot, '#', Items.stick}); GameRegistry.addShapedRecipe(new ItemStack(Mitems.oLeggings), new Object[] {"XXX", "X X", "X X", 'X', Mitems.oIngot}); GameRegistry.addShapedRecipe(new ItemStack(Mitems.oChestplate), new Object[] {"X X", "XXX", "XXX", 'X', Mitems.oIngot}); GameRegistry.addShapedRecipe(new ItemStack(Mitems.oHelmet), new Object[] {"XXX", "X X", 'X', Mitems.oIngot}); //shapeless recipes GameRegistry.addShapelessRecipe(new ItemStack(Items.string, 4), new Object[] {new ItemStack(Blocks.wool)}); } public static void addSmeltingRec () { GameRegistry.addSmelting(Mblocks.CopperOre, new ItemStack(Mitems.Copper), 15.0F); GameRegistry.addSmelting(Mblocks.TopazOre, new ItemStack(Mitems.Topaz), 15.0F); GameRegistry.addSmelting(Mblocks.CitrineOre, new ItemStack(Mitems.Citrine), 15.0F); GameRegistry.addSmelting(Mblocks.YttriumOre, new ItemStack(Mitems.Yttrium), 15.0F); } }[/p] [p]Please tell me what needs fixing.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumWhat? He's making separate tutorials for it, of course you can make new mods in 1.8.
-
View User Profile
-
View Posts
-
Send Message
Curse Premium2 questions:
1. Can you show us the main class?
2. Do the recipes not load or the mod itself? If it's the recipes, try another world.
The mod itself doesn't load I'll send everything you need to see.
crafting:
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack; import com.mod.blocks.Mblocks;
import com.mod.item.Mitems; import cpw.mods.fml.common.registry.GameRegistry; public class CraftingManager {
public static void mainRegistry() {
addCraftingRec();
addSmeltingRec ();
}
//Overworld
public static void addCraftingRec() {
//shaped recipes
GameRegistry.addShapedRecipe(new ItemStack(Mblocks.ComStone), new Object[] {"XX", "XX", 'X', Blocks.stone});
GameRegistry.addShapedRecipe(new ItemStack(Blocks.ice, 10), new Object[] {"XXX", "XXX", "XXX", 'X', Blocks.snow});
GameRegistry.addShapedRecipe(new ItemStack(Blocks.command_block), new Object[] {"AAA", "BCB", "AAA", 'A', Blocks.hardened_clay, 'B', Blocks.redstone_torch, 'C', Blocks.redstone_block});
GameRegistry.addShapedRecipe(new ItemStack(Blocks.web, 3), "X X", new Object[] {" X ", "X X", 'X', Items.string});
GameRegistry.addShapedRecipe(new ItemStack(Blocks.sponge, 6), new Object[] {"XXX", "XXX", "XXX", 'X', Blocks.wool});
GameRegistry.addShapedRecipe(new ItemStack(Blocks.farmland), new Object[] {"XX", "XX", 'X', Blocks.dirt});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oAxe), new Object[] {"XX", "X# ", " # ", 'x', Mitems.oIngot, '#', Items.stick});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oBoots), new Object[] {"X X", "X X", 'X', Blocks.dirt});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oSpear), new Object[] {" X", " X ", "X ", 'X', Mitems.ostick});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oSword), new Object[] {"X", "X", "#", 'X', Blocks.dirt, '#', Items.stick});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oPick), new Object[] {"XXX", " # ", " # ", 'X', Mitems.oIngot, '#', Items.stick});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oSpade), new Object[] {"XXX", " # ", " # ", 'X', Mitems.oIngot, '#', Items.stick});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oIngot), new Object[] {"XXX", "XXX", "XXX", 'X', Mitems.oShardPiece});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.ostick), new Object[] {" X", " X ", "X ", 'X', Mitems.oIngot});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oIngot), new Object[] {"X", "X", 'X', Blocks.obsidian});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oHoe), new Object[] {"XXX", " # ", " # ", 'X', Mitems.oIngot, '#', Items.stick});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oLeggings), new Object[] {"XXX", "X X", "X X", 'X', Mitems.oIngot});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oChestplate), new Object[] {"X X", "XXX", "XXX", 'X', Mitems.oIngot});
GameRegistry.addShapedRecipe(new ItemStack(Mitems.oHelmet), new Object[] {"XXX", "X X", 'X', Mitems.oIngot});
//shapeless recipes
GameRegistry.addShapelessRecipe(new ItemStack(Items.string, 4), new Object[] {new ItemStack(Blocks.wool)});
}
public static void addSmeltingRec () {
GameRegistry.addSmelting(Mblocks.CopperOre, new ItemStack(Mitems.Copper), 15.0F);
GameRegistry.addSmelting(Mblocks.TopazOre, new ItemStack(Mitems.Topaz), 15.0F);
GameRegistry.addSmelting(Mblocks.CitrineOre, new ItemStack(Mitems.Citrine), 15.0F);
GameRegistry.addSmelting(Mblocks.YttriumOre, new ItemStack(Mitems.Yttrium), 15.0F);
}
}
import com.mod.creativetabs.McreativeTabs;
import com.mod.item.Mitems;
import com.mod.lib.RefStrings;
import com.mod.world.Mworld; import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent; @Mod(modid = RefStrings.MODID , name = RefStrings.NAME , version = RefStrings.VERSION)
public class MainRegistry { @SidedProxy(clientSide = RefStrings.CLIENTSIDE , serverSide = RefStrings.SERVERSIDE)
public static ServerProxy proxy;
@EventHandler
public static void PreLoad (FMLPreInitializationEvent PreEvent) {
McreativeTabs.initializeTabs();
Mblocks.mainRegistry();
Mitems.mainRegistry();
Mworld.mainRegistry();
CraftingManager.mainRegistry();
proxy.registerRenderInfo();
}
@EventHandler
public static void load (FMLInitializationEvent event) {
}
@EventHandler
public static void PostLoad (FMLPostInitializationEvent PostEvent) {
}
}
import cpw.mods.fml.common.registry.GameRegistry; public class Mworld {
public static void mainRegistry() {
initialiseWorldGen();
}
public static void initialiseWorldGen() {
registerWorldGen(new ComStoneOre(), 1);
}
public static void registerWorldGen(IWorldGenerator worldGenClass, int weightedProbability) {
GameRegistry.registerWorldGenerator(worldGenClass, weightedProbability);
}
}
Register recipes in init instead of preInit.
Where does it say preInit? How do I change it? Can you please show me exactly where?
PreLoad (FMLPreInitializationEvent PreEvent)
preInit is my abbreviation (and should be everyone's) for FMLPreInitializationEvent as a method name. In your case, you have it as preLoad, so move it from that method, to the load method.
What is FMLPreInitializationEvent? Is it the thing in the main class I have? Please make the changes.
yes your main class should have 3 methods preinit init and postinit