Jump to content

Compiling issues


coco12345678910

Recommended Posts

Hello i am new to modding but recently i have been learning how to code some basic items in minecraft. i got my mod working within the eclipse client (and server) but when i compiled my mod it no longer worked i will attach some of the files and the crash-report if anyone can help me. BTW the mod is for 1.8.9-forge-11.15.0.1708

crash-report:

---- Minecraft Crash Report ----
// Oh - I know what I did wrong!

Time: 13/02/16 3:19 PM
Description: There was a severe problem during mod loading that has caused the game to fail

net.minecraftforge.fml.common.LoaderException: java.lang.NoClassDefFoundError: coco12345678910/TheCoconutMod/Blocks/BlockTest
at net.minecraftforge.fml.common.LoadController.transition(LoadController.java:162)
at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:559)
at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:240)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:417)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:329)
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)
Caused by: java.lang.NoClassDefFoundError: coco12345678910/TheCoconutMod/Blocks/BlockTest
at coco12345678910.TheCoconutMod.init.TheCoconutModBlocks.init(TheCoconutModBlocks.java:20)
at coco12345678910.TheCoconutMod.TheCoconutMod.preInit(TheCoconutMod.java:26)
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:560)
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:211)
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:189)
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:118)
at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:556)
... 10 more
Caused by: java.lang.ClassNotFoundException: coco12345678910.TheCoconutMod.Blocks.BlockTest
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 39 more
Caused by: java.lang.NullPointerException
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)
... 41 more


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

-- System Details --
Details:
Minecraft Version: 1.8.9
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: 83477104 bytes (79 MB) / 269127680 bytes (256 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.19 Powered by Forge 11.15.0.1708 7 mods loaded, 7 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCH	mcp{9.18} [Minecraft Coder Pack] (minecraft.jar) 
UCH	FML{8.0.99.99} [Forge Mod Loader] (forge-1.8.9-11.15.0.1708.jar) 
UCH	Forge{11.15.0.1708} [Minecraft Forge] (forge-1.8.9-11.15.0.1708.jar) 
UCH	JEI{2.19.0.93} [Just Enough Items] (jei_1.8.9-2.19.0.93.jar) 
UCH	JEIAddons{0.9.0.32} [Just Enough Items Addons] (JEIAddons_1.8.9-0.9.0.32.jar) 
UCH	journeymap{5.1.3} [JourneyMap] (journeymap-1.8.8-5.1.3-unlimited.jar) 
UCE	tcm{1.0} [The Coconut Mod] (TheCoconutModv1.03(1.8.9).jar) 
Loaded coremods (and transformers): 
GL info: ' Vendor: 'Intel' Version: '4.3.0 - Build 10.18.10.3947' Renderer: 'Intel(R) HD Graphics 5500'

coco12345678910.TheCoconutMod.Blocks.BlockTest.java:

package coco12345678910.TheCoconutMod.Blocks;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;

public class BlockTest extends Block{

public BlockTest(Material materialIn) {
	super(materialIn);
}

}

coco12345678910.TheCoconutMod.TheCoconutModBlocks.java:

package coco12345678910.TheCoconutMod.init;

import coco12345678910.TheCoconutMod.Reference;
import coco12345678910.TheCoconutMod.TheCoconutMod;
import coco12345678910.TheCoconutMod.Blocks.BlockTest;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;

public class TheCoconutModBlocks {

public static Block coconut_block;
public static Block coconut_ore;

public static void init(){

	coconut_block = new BlockTest(Material.wood).setUnlocalizedName("coconut_block").setCreativeTab(TheCoconutMod.tabCoconut);
	coconut_ore = new BlockTest(Material.iron).setUnlocalizedName("coconut_ore").setCreativeTab(TheCoconutMod.tabCoconut);
}

public static void register(){

	GameRegistry.registerBlock(coconut_block, coconut_block.getUnlocalizedName().substring(5));
	GameRegistry.registerBlock(coconut_ore, coconut_ore.getUnlocalizedName().substring(5));
}

public static void registerRenders(){

	registerRender(coconut_block);
	registerRender(coconut_ore);
}

public static void registerRender(Block block){

	Item item = Item.getItemFromBlock(block);
	Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" +item.getUnlocalizedName().substring(5), "inventory"));
}
}

Link to comment
Share on other sites

It may not be the source of your problem, but build 1708 is neither recommended nor most recent. To get the best help with 1.8.9, you should probably update to the most recent build. If you look at all the bug fixes in the changelog, you'd understand why those in-the-know wouldn't want to sort errors in an old build.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

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