Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

How do I get FML to load my mod


RamenChef
 Share

Recommended Posts

I’ve tried almost everything I could to do to my mod, and forge just can’t load my mod without crashing.

 

---- Minecraft Crash Report ----

// Why did you do that?

 

Time: 3/27/15 4:46 PM

Description: There was a severe problem during mod loading that has caused the game to fail

 

cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: net.ramenchef.ecologyproject.EcologyProject

at cpw.mods.fml.common.LoadController.transition(LoadController.java:162)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:502)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:204)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)

at net.minecraft.client.Minecraft.run(Minecraft.java:931)

at net.minecraft.client.main.Main.main(Main.java:164)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

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)

Caused by: java.lang.ClassNotFoundException: net.ramenchef.ecologyproject.EcologyProject

at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)

at java.lang.ClassLoader.loadClass(ClassLoader.java:425)

at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:58)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:274)

at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:420)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

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:208)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

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:118)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:492)

... 12 more

Caused by: java.lang.UnsupportedClassVersionError: net/ramenchef/ecologyproject/EcologyProject : Unsupported major.minor version 52.0

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:800)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)

... 40 more

 

 

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

---------------------------------------------------------------------------------------

 

-- System Details --

Details:

Minecraft Version: 1.7.10

Operating System: Mac OS X (x86_64) version 10.10.2

Java Version: 1.7.0_71, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 867409048 bytes (827 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 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.85.1277 Minecraft Forge 10.13.2.1277 4 mods loaded, 4 mods active

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed

FML{7.10.85.1277} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1277.jar) Unloaded->Constructed

Forge{10.13.2.1277} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1277.jar) Unloaded->Constructed

RamenChef_EcologyProject{1.0} [RamenChef_EcologyProject] (bin) Unloaded->Errored

 

Please help!

SAMPLE TEXT

Link to comment
Share on other sites

Code please :)

Here’s my mod class:

package net.ramenchef.ecologyproject;

import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;

@Mod(modid = EcologyProject.MODID, version = EcologyProject.VERSION)
public class EcologyProject {
    public static final String MODID = "RamenChef_EcologyProject";
    public static final String VERSION = "1.0";
    public static Item darkredstone;
    public static Block industrialct;
    @EventHandler
    public void preInit(FMLPreInitializationEvent event)
    {
    	//industrialct = new BlockICT
    	darkredstone = new ItemDR();
    	
    	GameRegistry.registerItem(darkredstone, "Dark Redstone");
    }
    @EventHandler
    public void init(FMLInitializationEvent event)
    {
    	GameRegistry.addRecipe(new ItemStack(Items.beef),
    			"ONO",
    			"NXN",
    			"ONO",
    			'O', Items.diamond, 'N', Items.iron_ingot, 'X', Blocks.crafting_table
    	);
    }
}

And the one other class in the mod:

package net.ramenchef.ecologyproject;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;

public class ItemDR extends Item {
public ItemDR()
{
	setUnlocalizedName(EcologyProject.MODID + "_" + "darkrs");
	setCreativeTab(CreativeTabs.tabMisc);
}
}

SAMPLE TEXT

Link to comment
Share on other sites

Your code seems fine. The root of your problem is this:

 

Caused by: java.lang.UnsupportedClassVersionError: net/ramenchef/ecologyproject/EcologyProject : Unsupported major.minor version 52.0

 

Which probably means you are compiling with java 8 and running with java 7, or something like that.

just you wait! ;)

Link to comment
Share on other sites

look at the third to last line in the first code piece.

 

");"

 

I don't think that belongs, although I might be miscounting the number of brackets/parenthesis.

 

It is closing the addRecipe call.

 

Ah. well then it's probably better visually to move it to the previous line. it looks like a mistyped curly bracket the way it's currently sitting. :P

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.