MCreator recipe problem

Started by Kevaday on Tue, 11/22/2016 - 20:21

Topic category: General discussion

Last seen on 19:26, 6. Oct 2019
Joined Aug 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
MCreator recipe problem
Sat, 11/26/2016 - 11:51 (edited)

Hello!

I'm hoping someone can help me because I have a pretty big issue.

Ever since I updated from MCreator 1.7.0 to 1.7.1 my mods aren't working. What I mean by this is that I make my mod, export it (with no compiling issues), and save it into my mods folder in .minecraft. When I start minecraft in the forge acount (latest version), it loads, and right before it's done loading, it crashes. Here is the message that minecraft gives me:

---- Minecraft Crash Report ----
// Would you like a cupcake?

Time: 11/22/16 3:20 PM
Description: Initializing game

java.lang.ArrayIndexOutOfBoundsException: 3
    at net.minecraft.item.crafting.CraftingManager.func_92103_a(SourceFile:1172)
    at net.minecraftforge.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:230)
    at net.minecraftforge.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:225)
    at mod.mcreator.mcreator_corn.load(mcreator_corn.java:31)
    at mod.mcreator.KevsModMC.load(KevsModMC.java:878)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    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:239)
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:217)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    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:142)
    at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:788)
    at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:322)
    at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:520)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:351)
    at net.minecraft.client.main.Main.main(SourceFile:124)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
    at net.minecraft.item.crafting.CraftingManager.func_92103_a(SourceFile:1172)
    at net.minecraftforge.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:230)
    at net.minecraftforge.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:225)
    at mod.mcreator.mcreator_corn.load(mcreator_corn.java:31)
    at mod.mcreator.KevsModMC.load(KevsModMC.java:878)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    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:239)
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:217)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    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:142)
    at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:788)
    at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:322)
    at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:520)

-- Initialization --
Details:
Stacktrace:
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:351)
    at net.minecraft.client.main.Main.main(SourceFile:124)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

-- System Details --
Details:
    Minecraft Version: 1.10.2
    Operating System: Windows 8.1 (amd64) version 6.3
    Java Version: 1.8.0_25, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 206004640 bytes (196 MB) / 473874432 bytes (451 MB) up to 1060372480 bytes (1011 MB)
    JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP 9.32 Powered by Forge 12.18.1.2074 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.19} [Minecraft Coder Pack] (minecraft.jar) 
    UCHI    FML{8.0.99.99} [Forge Mod Loader] (forge-1.10.2-12.18.1.2074.jar) 
    UCHI    Forge{12.18.1.2074} [Minecraft Forge] (forge-1.10.2-12.18.1.2074.jar) 
    UCHE    KevsModMC{0.5.5} [KevsModMC] (Kev'sModMC_0.5.5.jar) 
    Loaded coremods (and transformers): 
    GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.3.12618 Compatibility Profile Context 13.251.9001.1001' Renderer: 'AMD Radeon R7 200 Series'
    Launched Version: 1.10.2-forge1.10.2-12.18.1.2074
    LWJGL: 2.9.4
    OpenGL: AMD Radeon R7 200 Series GL version 4.3.12618 Compatibility Profile Context 13.251.9001.1001, ATI Technologies Inc.
    GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

    Using VBOs: Yes
    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)
    CPU: 4x Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz

If you're a pro and understand all this (which I don't) can you please help me?

Thanks!

Edited by Klemen on Sat, 11/26/2016 - 11:51
Last seen on 17:24, 15. Mar 2017
Joined Oct 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
This is something with your
Wed, 11/23/2016 - 17:01

This is something with your mod and not something with MCreator.

Last seen on 00:21, 11. Aug 2019
Joined Aug 2013
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Just remove recipe code from
Wed, 11/23/2016 - 18:36

Just remove recipe code from your mcreator_corn

Last seen on 19:26, 6. Oct 2019
Joined Aug 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
RE:Just remove recipe code from
Fri, 11/25/2016 - 13:25

@#2 Recipe code? plz explain. I'm not good at these stuff :P

Last seen on 10:15, 29. Mar 2017
Joined Sep 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
RE:RE:Just remove recipe code from
Fri, 11/25/2016 - 14:58

@#2.1

Just Scroll Down in the Corn's Code until you find the Corn's Recipe Code,

Last seen on 19:26, 6. Oct 2019
Joined Aug 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
RE:RE:RE:Just remove recipe code from
Fri, 11/25/2016 - 21:17

@#2.1.1

This code?

GameRegistry.addRecipe(new ItemStack(block, 1), new Object[]{"XXX", "XXX", "XXX",});

Last seen on 19:26, 6. Oct 2019
Joined Aug 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
RE:RE:RE:Just remove recipe code from
Fri, 11/25/2016 - 22:10

@#2.1.1

Here is the whole mcreator_corn file:

 

import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;

import net.minecraft.world.World;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemFood;
import net.minecraft.item.Item;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.Minecraft;

import java.util.Random;

public class mcreator_corn {

     public mcreator_corn() {
     }

    public static Item block;
    public static Object instance;

    public void load(FMLInitializationEvent event) {
        if (event.getSide() == Side.CLIENT)
            Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
                    .register(block, 0, new ModelResourceLocation("TestEnvironmentMod:Corn", "inventory"));
                       GameRegistry.addRecipe(new ItemStack(block, 1), new Object[]{"XXX", "XXX", "XXX",});
    }

    public void generateNether(World world, Random random, int chunkX, int chunkZ) {
    }

    public void generateSurface(World world, Random random, int chunkX, int chunkZ) {
    }

    public int addFuel(ItemStack fuel) {
        return 0;
    }

    public void serverLoad(FMLServerStartingEvent event) {
    }

    public void preInit(FMLPreInitializationEvent event) {
    }

    public void registerRenderers() {
    }

    static {
        block = (Item) (new BlockCustomFood(4, 0.3F, false));
        block = ((BlockCustomFood) block);
        block.setMaxStackSize(64);
        block.setCreativeTab(CreativeTabs.FOOD);

    }

    public static class BlockCustomFood extends ItemFood {
        public BlockCustomFood(int par2, float par3, boolean par4) {
            super(par2, par3, par4);
            setUnlocalizedName("Corn");
            GameRegistry.registerItem(this, "Corn");
        }

    }
}

 

 

If you know what's wrong with it, please let me know. Thanks! XD

Last seen on 00:21, 11. Aug 2019
Joined Aug 2013
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Yes , remove the one that you
Fri, 11/25/2016 - 22:36

Yes , remove the one that you mentioned in previous post.

Last seen on 10:15, 29. Mar 2017
Joined Sep 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
RE:RE:RE:RE:Just remove recipe code from
Fri, 11/25/2016 - 22:48

@#2.1.1.2

import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;

import net.minecraft.world.World;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemFood;
import net.minecraft.item.Item;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.Minecraft;

import java.util.Random;

public class mcreator_corn {

     public mcreator_corn() {
     }

    public static Item block;
    public static Object instance;

    public void load(FMLInitializationEvent event) {
        if (event.getSide() == Side.CLIENT)
            Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
                    .register(block, 0, new ModelResourceLocation("TestEnvironmentMod:Corn", "inventory"));
                      > GameRegistry.addRecipe(new ItemStack(block, 1), new Object[]{"XXX", "XXX", "XXX",});<
    }

    public void generateNether(World world, Random random, int chunkX, int chunkZ) {
    }

    public void generateSurface(World world, Random random, int chunkX, int chunkZ) {
    }

    public int addFuel(ItemStack fuel) {
        return 0;
    }

    public void serverLoad(FMLServerStartingEvent event) {
    }

    public void preInit(FMLPreInitializationEvent event) {
    }

    public void registerRenderers() {
    }

    static {
        block = (Item) (new BlockCustomFood(4, 0.3F, false));
        block = ((BlockCustomFood) block);
        block.setMaxStackSize(64);
        block.setCreativeTab(CreativeTabs.FOOD);

    }

    public static class BlockCustomFood extends ItemFood {
        public BlockCustomFood(int par2, float par3, boolean par4) {
            super(par2, par3, par4);
            setUnlocalizedName("Corn");
            GameRegistry.registerItem(this, "Corn");
        }

    }
}

 

Delete the Bit of Code i pointed out with the ><'s.

PS: Remember, the code will Reset itself to default if you edit it through MCreator's GUI. sooo... be careful of that...

Last seen on 19:26, 6. Oct 2019
Joined Aug 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
RE:RE:RE:RE:RE:Just remove recipe code from
Fri, 11/25/2016 - 23:09

IT WORKS!!!!

Thank you both for your help !  :D

Last seen on 10:15, 29. Mar 2017
Joined Sep 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
RE:RE:RE:RE:RE:RE:Just remove recipe code from
Sat, 11/26/2016 - 00:39

@#4

no problem! :D first time i have helped someone! 

Last seen on 04:53, 6. Oct 2017
Joined Nov 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Try removing corn from your
Sat, 11/26/2016 - 04:55

Try removing corn from your mod.

Last seen on 10:15, 29. Mar 2017
Joined Sep 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
RE:Try removing corn from your
Sat, 11/26/2016 - 12:38

@#5

your a bit late, me and someone else already helped him.