Jump to content

Recommended Posts

Posted

Just started working with 1.8 and for the life of me I cant figure what I did wrong.

Block code:

[embed=425,349][embed=425,349]public class CDMBlocks {

 

public static Block idek ;

 

public static void init(){

idek = new blockEX(Material.carpet).setUnlocalizedName("idek");

}

 

public static void register(){

GameRegistry.registerBlock(idek, idek.getUnlocalizedName().substring(5));

 

}

 

public static void registerRenders() {

registerRender(idek);

}

 

public static void registerRender(Block block){

Item item = Item.getItemFromBlock(block);

Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(CDMRef.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));

}

 

}[/embed][/embed]

 

 

Block extension:

[embed=425,349][embed=425,349]package Kingz.CDM.blocks;

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

 

public class blockEX extends Block {

 

public blockEX(Material materialIn) {

super(materialIn);

}

 

}

[/embed][/embed]

 

 

Handler:

[embed=425,349][embed=425,349]@Mod(modid = CDMRef.MOD_ID, name = CDMRef.MOD_NAME, version = CDMRef.VERSION )

public class CDM {

 

@SidedProxy(clientSide = CDMRef.CLIENT_PROXY_CLASS, serverSide = CDMRef.SERVER_PROXY_CLASS)

public static CommonProxy proxy;

 

@EventHandler

public void preInit(FMLPreInitializationEvent event)

{

CDMBlocks.register();

CDMBlocks.init();

CDMItems.register();

CDMItems.init();

 

}

 

 

@EventHandler

public void init(FMLInitializationEvent event)

{

proxy.registerRenders();

}

 

@EventHandler

public void postInit(FMLPostInitializationEvent event)

{

 

}

 

}

[/embed][/embed]

 

 

[embed=425,349][embed=425,349][/embed][/embed]

 

Posted

Minecraft Crash Report ----

// I just don't know what went wrong :(

 

Time: 6/11/15 7:35 PM

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

 

net.minecraftforge.fml.common.LoaderException: java.lang.ClassNotFoundException: Kingz.CDM.proxy.ClientProxy

at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:77)

at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:517)

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

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

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

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:190)

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

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

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

at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:506)

at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:213)

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

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

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

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

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

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: Kingz.CDM.proxy.ClientProxy

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

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at net.minecraftforge.fml.common.ModClassLoader.loadClass(ModClassLoader.java:60)

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

at java.lang.Class.forName(Unknown Source)

at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:60)

... 35 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

Operating System: Windows 8.1 (amd64) version 6.3

Java Version: 1.8.0_25, Oracle Corporation

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

Memory: 875183176 bytes (834 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)

JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP v9.10 FML v8.0.99.99 Minecraft Forge 11.14.3.1446 4 mods loaded, 4 mods active

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

FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8-11.14.3.1446.jar) Unloaded->Constructed

Forge{11.14.3.1446} [Minecraft Forge] (forgeSrc-1.8-11.14.3.1446.jar) Unloaded->Constructed

CDM{1.0} [Crimals, Drugs, Money] (bin) Unloaded->Errored

Loaded coremods (and transformers):

GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.2.12422 Compatibility Profile Context 13.152.1.1000' Renderer: 'AMD Radeon HD 7660D'

Posted

package Kingz.CDM;

 

public class CDMRef {

public static final String MOD_ID = "CDM";

public static final String MOD_NAME = "workinprogress";

public static final String VERSION = "1.0";

public static final String CLIENT_PROXY_CLASS = "proxy.ClientProxy";

public static final String SERVER_PROXY_CLASS = "proxy.CommonProxy";

 

}

 

Posted

Still not working changed it to

[/[code]package Kingz.CDM;

public class CDMRef {
public static final String MOD_ID = "CDM";
public static final String MOD_NAME = "workinprogress";
public static final String VERSION = "1.0";
public static final String CLIENT_PROXY_CLASS = "Kingz.CDM.proxy.ClientProxy";
public static final String SERVER_PROXY_CLASS = "Kingz.CDM.proxy.CommonProxy";

}

code]

 

and here is my proxies

[/[code]package proxy;

import Kingz.CDM.init.CDMBlocks;
import Kingz.CDM.init.CDMItems;

public class ClientProxy extends CommonProxy {
@Override
public void registerRenders(){
	CDMItems.registerRenders();
	CDMBlocks.registerRenders();
}


}

code]

[/[code]package proxy;

public class CommonProxy {
public void registerRenders(){

}

}

code]

Posted

package proxy; // <== that looks very very wrong
public class ClientProxy extends CommonProxy {
// etc.

... Are you not getting any errors in Eclipse that tell you your package structure is wrong?

 

A "package" is basically the same as a directory, and it needs to include the full directory structure up to and including your main class:

package kingz.cdm.proxy; // also, package names should be all lower case
public class ClientProxy extends CommonProxy {
// etc.

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.