public String getVersion()
{
return "3.14159265";
}
}
Now when I run it it shows the Mojang sign and then crashes almost instantly...
Here's the error log-
229 recipes
---- Minecraft Crash Report ----
// I just don't know what went wrong
Time: 4/29/13 2:05 PM
Description: ModLoader has failed to initialize.
java.lang.NullPointerException
at net.minecraft.src.mod_CactusItems.load(mod_CactusItems.java:13)
at net.minecraft.src.ModLoader.init(ModLoader.java:787)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:180)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:96)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:417)
at net.minecraft.src.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:41)
at net.minecraft.client.Minecraft.run(Minecraft.java:726)
at java.lang.Thread.run(Unknown Source)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.5.1
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_21, Oracle Corporation
Java VM Version: Java HotSpotâ„¢ 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 952575312 bytes (908 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
Suspicious classes: Start[net.minecraft.src.IPlayerUsage, ILogAgent, MinecraftFakeLauncher, ...]
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
ModLoader: Mods loaded: 2
ModLoader 1.5.1
mod_CactusItems 3.14159265
Also I'm using Eclipse, Minecraft Coder pack, and java 7 and Jdk 7
Here's the code for the mod I made(Not much yet)-
import java.util.Random;
public class mod_CactusItems extends BaseMod
{
public static final Item CactusSword = new ItemSword (2181, EnumToolMaterial.CACTUS).setItemName("CactusSword");
public void load()
{
//Cactus Sword
CactusSword.iconIndex = ModLoader.addOverride("/gui/items.png" , "CactusSword.png");
ModLoader.addName(CactusSword, "Cactus Sword");
ModLoader.addRecipe(new ItemStack(CactusSword,1), new Object[]{
" X ", " * ", " * ", Character.valueOf('X'), Item.stick, Character.valueOf('*'), Block.cactus});
}
public String getVersion()
{
return "3.14159265";
}
}
Now when I run it it shows the Mojang sign and then crashes almost instantly...
Here's the error log-
---- Minecraft Crash Report ----
// I just don't know what went wrong
Time: 4/29/13 2:05 PM
Description: ModLoader has failed to initialize.
java.lang.NullPointerException
at net.minecraft.src.mod_CactusItems.load(mod_CactusItems.java:13)
at net.minecraft.src.ModLoader.init(ModLoader.java:787)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:180)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:96)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:417)
at net.minecraft.src.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:41)
at net.minecraft.client.Minecraft.run(Minecraft.java:726)
at java.lang.Thread.run(Unknown Source)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.5.1
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_21, Oracle Corporation
Java VM Version: Java HotSpotâ„¢ 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 952575312 bytes (908 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
Suspicious classes: Start[net.minecraft.src.IPlayerUsage, ILogAgent, MinecraftFakeLauncher, ...]
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
ModLoader: Mods loaded: 2
ModLoader 1.5.1
mod_CactusItems 3.14159265
Also I'm using Eclipse, Minecraft Coder pack, and java 7 and Jdk 7
Please Help me. PLEAS RESPOND O.O