Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

Could not initialize class net.minecraft.src.mod_minecraft


  • Please log in to reply
6 replies to this topic

#1

longmvu
    longmvu

    Tree Puncher

  • Members
  • 23 posts
  • Minecraft: longmvu

Posted 05 February 2013 - 12:12 AM

I got a error while making my mod

  Minecraft has crashed!   
  ----------------------   

Minecraft has stopped running because it encountered a problem; ModLoader has failed to initialize.

A full error report has been saved to C:\Users\long\Dropbox\Modding\Modloader\Modding 1.4.7\jars\.\crash-reports\crash-2013-02-04_19.11.30-client.txt - Please include a copy of that file (Not this screen!) if you report this crash to anyone; without it, they will not be able to help fix the crash Posted Image



--- BEGIN ERROR REPORT 2789f26a --------
Full report at:
C:\Users\long\Dropbox\Modding\Modloader\Modding 1.4.7\jars\.\crash-reports\crash-2013-02-04_19.11.30-client.txt
Please show that file to Mojang, NOT just this screen!

Generated 2/4/13 7:11 PM

-- System Details --
Details:
Minecraft Version: 1.4.7
Operating System: Windows 8 (x86) version 6.2
Java Version: 1.7.0_13, Oracle Corporation
Java VM Version: Java HotSpotâ„¢ Client VM (mixed mode), Oracle Corporation
Memory: 999858856 bytes (953 MB) / 1060372480 bytes (1011 MB) up to 1060372480 bytes (1011 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, MinecraftFakeLauncher, ThreadShutdown, ...]
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
ModLoader: Mods loaded: 3
ModLoader 1.4.7
mod_MCarmor 1.4.7
mod_MinecraftMobs 1.4.7


java.lang.NoClassDefFoundError: Could not initialize class net.minecraft.src.mod_minecraft
at net.minecraft.src.mod_MCarmor.load(mod_MCarmor.java:19)
at net.minecraft.src.ModLoader.init(ModLoader.java:960)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:190)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:93)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:421)
at net.minecraft.src.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:41)
at net.minecraft.client.Minecraft.run(Minecraft.java:741)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 69563f08 ----------


Here mod_minecraft

package net.minecraft.src;
import java.util.Random;
public class mod_minecraft extends BaseMod
{
//Blue Gem
public static final Item bluegem = new ItemBlueGem(2085).setItemName("Blue Gem").setCreativeTab(CreativeTabs.tabMisc);
//Shiny Gem
public static final Item shinygem = new ItemShinyGem(2100).setItemName("Shiny Gem").setCreativeTab(CreativeTabs.tabMisc);
//Blue Sword
public static final Item BlueSword = new ItemBlueSword(3077, EnumToolMaterial.BLUEGEM).setItemName("Blue Sword");
//Blue Pickaxe
public static final Item bluePick = new ItemPickaxe(2102, EnumToolMaterial.BLUEGEM).setItemName("Blue Pickaxe");
//Blue Axe
public static final Item blueAxe = new ItemBlueAxe(2096, EnumToolMaterial.BLUEGEM).setItemName("Blue Axe");
//Blue Hoe
public static final Item blueHoe = new ItemHoe(2107, EnumToolMaterial.BLUEGEM).setItemName("Blue Hoe");
//Blue Shovel
public static final Item blueSpade = new ItemSpade(2099, EnumToolMaterial.BLUEGEM).setItemName("Blue Shovel");
//Blue Ore
public static final Block blueBlock = new BlockBlue(151, 0).setHardness(6F).setResistance(7.0F).setBlockName("Blue Ore").setCreativeTab(CreativeTabs.tabBlock);
//Blue Block
public static final Block bluesolidBlock = new Blockbluesolid(152, 0).setBlockName("Solid Blue Block").setHardness(5F).setResistance(6F).setStepSound(Block.soundMetalFootstep).setCreativeTab(CreativeTabs.tabBlock);
//Doughnut
public static final Item doughnut = new ItemFood(5000, 18, 15F, true).setItemName("Doughnut");
//Achievements
public static final Achievement achievementDoughnut = new Achievement(5400, "achievementDoughnut", 10, 9, mod_minecraft.doughnut, null).setSpecial().setIndependent().registerAchievement();
public static final Achievement achievementGem = new Achievement(5400, "achievementGem", 10, 9, mod_minecraft.bluegem, null).setSpecial().setIndependent().registerAchievement();
public static final Achievement achievementshinygem = new Achievement(5401, "achievementshinygem", 10, 12, mod_minecraft.shinygem, achievementGem).registerAchievement();
// Blue Ore Generate
public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{
	 Random randomGenerator = random;
	 for (int i = 0; i < 10; i++)
	 {
		 int randPosX = chunkX + randomGenerator.nextInt(20);
		 int randPosY = random.nextInt(60);
		 int randPosZ = chunkZ + randomGenerator.nextInt(20);
		 (new WorldGenMinable(blueBlock.blockID, 10)).generate(world, random, randPosX, randPosY, randPosZ);
	 }
}
public void load()
{
	 //Achievements
	 ModLoader.addAchievementDesc(achievementDoughnut, "Doughnut", "Craft a Doughnut!");
	 ModLoader.addAchievementDesc(achievementGem, "Blue Gem!", "Pick Up a Blue Gem!");
	 ModLoader.addAchievementDesc(achievementshinygem, "Shiny Gem!", "Smelt a gem");
	 // Blue Gem
	 bluegem.iconIndex = ModLoader.addOverride("/gui/items.png" , "/items/BlueGem.png");
	 ModLoader.addName(bluegem, "Gem");
	 // Shiny Gem
	 shinygem.iconIndex = ModLoader.addOverride("/gui/items.png" , "/items/blueshinygem.png");
	 ModLoader.addName(shinygem, "Shiny Gem");
	 // Blue Sword
	 BlueSword.iconIndex = ModLoader.addOverride("/gui/items.png" , "/items/bluesword.png");
	 ModLoader.addName(BlueSword, "Gem Sword");
	 ModLoader.addRecipe(new ItemStack(BlueSword, 1), new Object[]
			 {
				 " * ", " * ", " X ",
				 'X', Item.stick, '*', shinygem
			 });
	 // Blue Pickaxe
	 bluePick.iconIndex = ModLoader.addOverride("/gui/items.png" , "/items/bluepick.png");
	 ModLoader.addName(bluePick, "Gem Pickaxe");
	 ModLoader.addRecipe(new ItemStack(bluePick, 1), new Object[]
			 {
				 "***", " X ", " X ",
				 'X', Item.stick, '*', shinygem
			 });
	 // Blue Axe
	 blueAxe.iconIndex = ModLoader.addOverride("/gui/items.png" , "/items/blueaxe.png");
	 ModLoader.addName(blueAxe, "Gem Axe");
	 ModLoader.addRecipe(new ItemStack(blueAxe, 1), new Object[]
			 {
				 "** ", "*X ", " X ",
				 'X', Item.stick, '*', shinygem
			 });
	 // Blue Hoe
	 blueHoe.iconIndex = ModLoader.addOverride("/gui/items.png" , "/items/bluehoe.png");
	 ModLoader.addName(blueHoe, "Gem Hoe");
	 ModLoader.addRecipe(new ItemStack(blueHoe, 1), new Object[]
			 {
				 "** ", " X ", " X ",
				 'X', Item.stick, '*', shinygem
			 });
	 //Blue Shovel
	 blueSpade.iconIndex = ModLoader.addOverride("/gui/items.png" , "/items/blueshovel.png");
	 ModLoader.addName(blueSpade, "Gem Shovel");
	 ModLoader.addRecipe(new ItemStack(blueSpade, 1), new Object[]
			 {
				 " * ", " X ", " X ",
				 'X', Item.stick, '*', shinygem
			 });
	 // Blue Ore
	 ModLoader.registerBlock(blueBlock);
	 blueBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png" , "/items/blueore.png");
	 ModLoader.addName(blueBlock, "Gem Ore");
	 //Blue Solid Block
	 bluesolidBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/items/blueblock.png");
	 ModLoader.registerBlock(bluesolidBlock);
	 ModLoader.addName(bluesolidBlock, "Gem Solid Block");
	 ModLoader.addRecipe(new ItemStack(bluesolidBlock, 1), new Object [] {"###", "###", "###", '#', shinygem});
	 //Doughnut
	 doughnut.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/doughnut.png");
	 ModLoader.addName(doughnut, "Doughnut");
	 ModLoader.addRecipe(new ItemStack(doughnut, 5), new Object[]
			 {
				 "***", "* *", "***",
				 '*', Item.sugar
			 });
	 //Smelting Blue Gem to Shiny Gem
	 ModLoader.addSmelting(bluegem.itemID, new ItemStack(shinygem, 5), 5.0F);
	 //Smelting Dirt to Gem Solid Block
	 ModLoader.addSmelting(Block.dirt.blockID, new ItemStack(bluesolidBlock, 1), 1.0F);
}
//Achievements
public void takenFromCrafting(EntityPlayer entityplayer, ItemStack itemstack, IInventory iinventory)
{
	 if (itemstack.itemID == mod_minecraft.doughnut.itemID)
	 {
		 entityplayer.addStat(achievementDoughnut, 1);
	 }
}
public void onItemPickup(EntityPlayer entityplayer, ItemStack itemstack)
{
	 if (itemstack.itemID == mod_minecraft.bluegem.itemID)
	 {
		 entityplayer.addStat(achievementGem, 2);
	 }
}
public void takenFromFurnace(EntityPlayer entityplayer, ItemStack itemstack)
{
	 if (itemstack.itemID == mod_minecraft.shinygem.itemID)
	 {
		 entityplayer.addStat(achievementshinygem, 2);
	 }
}
//Fuel
public int addFuel(int par1, int par2)
{
	 if (par1 == bluegem.itemID) //200 ticks is normal,1600 ticks is coal
	 {
		 return 99999;
	 }
	 if (par1 == bluesolidBlock.blockID)
	 {
		 return 99999999;
	 }
	 return 0;
}
public String getVersion()
{
	 return "1.4.7";
}
}

Here mod_MCarmor
package net.minecraft.src;
import net.minecraft.client.Minecraft;
public class mod_MCarmor extends BaseMod
{
	public static final Item BlueBody = (new ItemArmor(2200, EnumArmorMaterial.BLUEGEM , 5, 1).setItemName("Gem Chestplate"));
	public static final Item BlueHelmet = (new ItemArmor(2201, EnumArmorMaterial.BLUEGEM , 5, 0).setItemName("Gem Helmet"));
	public static final Item BluePants = (new ItemArmor(2202, EnumArmorMaterial.BLUEGEM , 5, 2).setItemName("Gem Pants"));
	public static final Item BlueBoots = (new ItemArmor(2203, EnumArmorMaterial.BLUEGEM, 5, 3).setItemName("Gem Boots"));
	public void load()
	{
		// Chestplate Armor
		BlueBody.iconIndex = ModLoader.addOverride("/gui/items.png", "/armor/bluechest.png");
		ModLoader.addName(BlueBody, "Gem Chestplate");
		ModLoader.addRecipe(new ItemStack(BlueBody, 1), new Object[]
				{
					"* *", "***", "***", '*', mod_minecraft.shinygem
				});
		// Helmet Armor
		BlueHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/armor/bluehelm.png");
		ModLoader.addName(BlueHelmet, "Gem Helmet");
		ModLoader.addRecipe(new ItemStack(BlueHelmet, 1), new Object[]
				{
					"***", "* *", '*', mod_minecraft.shinygem
				});
		// Pants Armor
		BluePants.iconIndex = ModLoader.addOverride("/gui/items.png", "/armor/bluepants.png");
		ModLoader.addName(BluePants, "Gem Leggings");
		ModLoader.addRecipe(new ItemStack(BluePants, 1), new Object[]
				{
					"***", "* *", "* *", '*', mod_minecraft.shinygem
				});
		// Boots Armor
		BlueBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/armor/blueboots.png");
		ModLoader.addName(BlueBoots, "Gem Boots");
		ModLoader.addRecipe(new ItemStack(BlueBoots, 1), new Object[]
				{
					"* *", "* *", '*', mod_minecraft.shinygem
				});
		ModLoader.addArmor("blue");
	}
	public String Version()
	{
		return "1.4.7";
	}
	public String getVersion()
	{
		return "1.4.7";
	}
}


Register or log in to remove.

#2

-Reaper-
    -Reaper-

    Obsidian Miner

  • Members
  • 1315 posts

Posted 05 February 2013 - 12:16 AM

The problem seems to be in mod_MCarmor
Posted Image

Divine smoker mod - Hookah in Minecraft: http://www.minecraft...ookahshisha-11/

#3

longmvu
    longmvu

    Tree Puncher

  • Members
  • 23 posts
  • Minecraft: longmvu

Posted 05 February 2013 - 01:35 AM

View Post-Reaper-, on 05 February 2013 - 12:16 AM, said:

The problem seems to be in mod_MCarmor since it said net.minecraft.src.mod_minecraft. But here it is.
I dont know why is would be in there but here

package net.minecraft.src;
import net.minecraft.client.Minecraft;
public class mod_MCarmor extends BaseMod
{
	public static final Item BlueBody = (new ItemArmor(2200, EnumArmorMaterial.BLUEGEM , 5, 1).setItemName("Gem Chestplate"));
	public static final Item BlueHelmet = (new ItemArmor(2201, EnumArmorMaterial.BLUEGEM , 5, 0).setItemName("Gem Helmet"));
	public static final Item BluePants = (new ItemArmor(2202, EnumArmorMaterial.BLUEGEM , 5, 2).setItemName("Gem Pants"));
	public static final Item BlueBoots = (new ItemArmor(2203, EnumArmorMaterial.BLUEGEM, 5, 3).setItemName("Gem Boots"));
	public void load()
	{
		// Chestplate Armor
		BlueBody.iconIndex = ModLoader.addOverride("/gui/items.png", "/armor/bluechest.png");
		ModLoader.addName(BlueBody, "Gem Chestplate");
		ModLoader.addRecipe(new ItemStack(BlueBody, 1), new Object[]
				{
					"* *", "***", "***", '*', mod_minecraft.shinygem
				});
		// Helmet Armor
		BlueHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/armor/bluehelm.png");
		ModLoader.addName(BlueHelmet, "Gem Helmet");
		ModLoader.addRecipe(new ItemStack(BlueHelmet, 1), new Object[]
				{
					"***", "* *", '*', mod_minecraft.shinygem
				});
		// Pants Armor
		BluePants.iconIndex = ModLoader.addOverride("/gui/items.png", "/armor/bluepants.png");
		ModLoader.addName(BluePants, "Gem Leggings");
		ModLoader.addRecipe(new ItemStack(BluePants, 1), new Object[]
				{
					"***", "* *", "* *", '*', mod_minecraft.shinygem
				});
		// Boots Armor
		BlueBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/armor/blueboots.png");
		ModLoader.addName(BlueBoots, "Gem Boots");
		ModLoader.addRecipe(new ItemStack(BlueBoots, 1), new Object[]
				{
					"* *", "* *", '*', mod_minecraft.shinygem
				});
		ModLoader.addArmor("blue");
	}
	public String Version()
	{
		return "1.4.7";
	}
	public String getVersion()
	{
		return "1.4.7";
	}
}


#4

-Reaper-
    -Reaper-

    Obsidian Miner

  • Members
  • 1315 posts

Posted 05 February 2013 - 01:55 AM

Because of this in your crash log:
java.lang.NoClassDefFoundError: Could not initialize class net.minecraft.src.mod_minecraft
at net.minecraft.src.mod_MCarmor.load(mod_MCarmor.java:19)

It means that the error is in mod_MCarmor.load line 19.

You have your recipes wrong. Instead of this:
ModLoader.addRecipe(new ItemStack(BlueBody, 1), new Object[]
								{
										"* *", "***", "***", '*', mod_minecraft.shinygem
								});

it should be like this
ModLoader.addRecipe(new ItemStack(BlueBody, 1), new Object[]
								{
										"* *", "***", "***", Character.valueof('*'), mod_minecraft.shinygem
								});


Posted Image

Divine smoker mod - Hookah in Minecraft: http://www.minecraft...ookahshisha-11/

#5

caagr98
    caagr98

    Obsidian Miner

  • Members
  • 1242 posts
  • Minecraft: Caagr_98

Posted 05 February 2013 - 07:16 AM

The Character.valueOf is not required, and just makes it messy.
Never dig down. Especially not in Spleef.
Posted Image

#6

longmvu
    longmvu

    Tree Puncher

  • Members
  • 23 posts
  • Minecraft: longmvu

Posted 06 February 2013 - 09:55 PM

View Post-Reaper-, on 05 February 2013 - 01:55 AM, said:

Because of this in your crash log:
java.lang.NoClassDefFoundError: Could not initialize class net.minecraft.src.mod_minecraft
at net.minecraft.src.mod_MCarmor.load(mod_MCarmor.java:19)

It means that the error is in mod_MCarmor.load line 19.

You have your recipes wrong. Instead of this:
ModLoader.addRecipe(new ItemStack(BlueBody, 1), new Object[]
{
"* *", "***", "***", '*', mod_minecraft.shinygem
});

it should be like this
ModLoader.addRecipe(new ItemStack(BlueBody, 1), new Object[]
{
"* *", "***", "***", Character.valueof('*'), mod_minecraft.shinygem
});

View Postcaagr98, on 05 February 2013 - 07:16 AM, said:

The Character.valueOf is not required, and just makes it messy.

Ok I tried that but it still doesn't work. Here the log from eclipse.

27 achievements
210 recipes
Setting user: Player928, -
Client asked for parameter: server
LWJGL Version: 2.4.2
ModLoader 1.4.7 Initializing...
Mod Initialized: mod_MCarmor 1.4.7
Failed to load mod from "mod_minecraft.class"
Mod Initialized: mod_MinecraftMobs 1.4.7
Overriding /gui/items.png with /armor/bluechest.png @ 38. 55 left.
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: component argument pData
    at sun.java2d.windows.GDIWindowSurfaceData.initOps(Native Method)
    at sun.java2d.windows.GDIWindowSurfaceData.<init>(Unknown Source)
    at sun.java2d.windows.GDIWindowSurfaceData.createData(Unknown Source)
    at sun.java2d.d3d.D3DScreenUpdateManager.getGdiSurface(Unknown Source)
    at sun.java2d.d3d.D3DScreenUpdateManager.createGraphics(Unknown Source)
    at sun.awt.windows.WComponentPeer.getGraphics(Unknown Source)
    at java.awt.Component.getGraphics(Unknown Source)
    at sun.awt.RepaintArea.paint(Unknown Source)
    at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$200(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:421)
    at net.minecraft.src.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:41)
    at net.minecraft.client.Minecraft.run(Minecraft.java:741)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: Could not initialize class net.minecraft.src.mod_minecraft
    at net.minecraft.src.ModLoader.init(ModLoader.java:996)
    at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:190)
    at net.minecraft.src.RenderManager.<init>(RenderManager.java:93)
    at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
    ... 4 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.minecraft.src.mod_minecraft
    at net.minecraft.src.mod_MCarmor.load(mod_MCarmor.java:19)
    at net.minecraft.src.ModLoader.init(ModLoader.java:960)
    ... 7 more
Someone is closing me!

#7

longmvu
    longmvu

    Tree Puncher

  • Members
  • 23 posts
  • Minecraft: longmvu

Posted 06 February 2013 - 10:05 PM

Update:I tried to change the material you use to make the item. It worked, but i want to use my item. So there is something wrong with mod_minecraft.

More update: It because of the achievements. Something is wrong with it.