Jump to content

Modding, Or: How I learned to stop sucking by getting help from people better than me.


Xylord

Recommended Posts

Howdy all of you, smart people!

I have to request your help once more. I am presently in a process of learning to mod. I can do stuff with java, but at the very beginning of my experience I'm encountering apparently insurmountable difficulties. Now, I know that once one of you finds out what's wrong, I'm going to feel like an idiot because it'll be a thing simple as fuck, but I really can't help myself right now.

First here's the mod, in a zip.

http://www.mediafire.com/?6vn3bi71pe00k67

Eclipse isn't giving me any errors. Also, I have correctly installed MCP and FML. I've decompiled minecraft correctly too, and the files appear correctly in my workshop.

The path to get to the mod in Eclipse is /Minecraft/common (source folder)/Tutorial.common (package)/Tutorial.java(.class file)

The mod is named Tutorial, since that's exactly what it is.

Once I've done that, I recompile, reobfuscate and go in the reobf folder in MCP. There I can find /minecraft/Tutorial/common/Tutorial.class.

I compress in a .zip the folder named Tutorial, place it in the mods folder in my minecraft (Who has Forge correctly installed).

Then, I try to play the game with my mod, and I get this error:

---- Minecraft Crash Report ----

// Shall we play a game?

 

Time: 29/08/12 4:42 PM

Description: Failed to start game

 

java.lang.NullPointerException

    at cpw.mods.fml.common.FMLModContainer.getName(FMLModContainer.java:106)

    at cpw.mods.fml.common.Loader.sortModList(Loader.java:236)

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

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

    at net.minecraft.client.Minecraft.a(Minecraft.java:402)

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

    at java.lang.Thread.run(Unknown Source)

 

Relevant Details:

- Minecraft Version: 1.3.2

- Operating System: Windows 7 (amd64) version 6.1

- Java Version: 1.7.0_06, Oracle Corporation

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

- Memory: 406857760 bytes (388 MB) / 514523136 bytes (490 MB) up to 954466304 bytes (910 MB)

- JVM Flags: 2 total; -Xms512m -Xmx1024m

- LWJGL: 2.4.2

- OpenGL: GeForce GTX 660M/PCIe/SSE2 GL version 4.2.0, NVIDIA Corporation

- Is Modded: Definitely; 'forge,fml'

- Type: Client

- Texture Pack: Default

- Profiler Position: N/A (disabled)

And... Yeah, pretty much. If there's any missing info, please do ask.

Link to comment
Share on other sites

Ok, one thing to note. You can actually add the jar/zip files into the instance that Eclipse uses, so that you can debug their loading. There will be a line somewhere in the console output saying "[iNFO] [ForgeModLoader] Searching XXXXX for mods". It appears to be the jars/mods folder inside your MCP folder.

Did a little debugging, and I think it has to do with you not having a "mcmod.info" file in the zip folder. There appears to be code that should be putting default values in, but I don't think it's being properly triggered on jar mods.

Can you give that a try?

EDIT - I went ahead an posted an issue report on the FML github, we'll see what they think.

https://github.com/cpw/FML/issues/89

Link to comment
Share on other sites

Have you tried running your mod while still in eclipse. There's the green "Run" button up in the top left. If it still crashes, there will be a bunch of info in the eclipse console window, down near the bottom, that should prove useful. You could also redirect the output from minecraft to a text file. http://www.minecraftwiki.net/wiki/Crash

If we figure out where exactly it's crashing, debugging becomes easier.

Link to comment
Share on other sites

So cpw responded to my issue, and apparently this was already fixed and released in a subsequent build of FML and forge. You can go to their build system here http://jenkins.minecraftforge.net:7070/job/forge/lastBuild/ and download the latest version with a little star.

There's a different error that pops up, but at least this specific one is resolved.

Link to comment
Share on other sites

So cpw responded to my issue, and apparently this was already fixed and released in a subsequent build of FML and forge. You can go to their build system here http://jenkins.minecraftforge.net:7070/job/forge/lastBuild/ and download the latest version with a little star.

There's a different error that pops up, but at least this specific one is resolved.

Alright, testing from Eclipse directly worked perfectly!

Thanks for the heads up, I'll try updating my Forge and I'll report back.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...