Jump to content

1.8 Game crashes after I tried to add a block


Kingz101

Recommended Posts

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]

 

Link to comment
Share on other sites

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'

Link to comment
Share on other sites

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";

 

}

 

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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.

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Baba  Serege [[+27-73 590 8989]] has experience of 27 years in helping and guiding many people from all over the world. His psychic abilities may help you answer and resolve many unanswered questions. He specialize in helping women and men from all walks of life.. 1) – Bring back lost lover. even if lost for a long time. 2) – My lover is abusing alcohol, partying and cheating on me I urgently need help” 3) – Divorce or court issues. 4) – Is your love falling apart? 5) – Do you want your love to grow stronger? 6) – Is your partner losing interest in you? 7) – Do you want to catch your partner cheating on you? – We help to keep your partner faithful and loyal to you. 9) – We recover love and happiness when relationship breaks down. 10) – Making your partner loves you alone. 11) – We create loyalty and everlasting love between couples. 12) – Get a divorce settlement quickly from your ex-partner. 13) – We create everlasting love between couples. 14) – We help you look for the best suitable partner. 15) – We bring back lost lover even if lost for a long time. 16) – We strengthen bonds in all love relationship and marriages 17) – Are you an herbalist who wants to get more powers? 18) – Buy a house or car of your dream. 19) – Unfinished jobs by other doctors come to me. 20) – I help those seeking employment. 21) – Pensioners free treatment. 22) – Win business tenders and contracts. 23) – Do you need to recover your lost property? 24) – Promotion at work and better pay. 25) – Do you want to be protected from bad spirits and nightmares? 26) – Financial problems. 27) – Why you can’t keep money or lovers? 28) – Why you have a lot of enemies? 29) – Why you are fired regularly on jobs? 30) – Speed up money claim spell, delayed payments, pension and accident funds 31) – I help students pass their exams/interviews. 33) – Removal of bad luck and debts. 34) – Are struggling to sleep because of a spiritual wife or husband. 35- ) Recover stolen property
    • OLXTOTO adalah situs bandar togel online resmi terbesar dan terpercaya di Indonesia. Bergabunglah dengan OLXTOTO dan nikmati pengalaman bermain togel yang aman dan terjamin. Koleksi toto 4D dan togel toto terlengkap di OLXTOTO membuat para member memiliki pilihan taruhan yang lebih banyak. Sebagai situs togel terpercaya, OLXTOTO menjaga keamanan dan kenyamanan para membernya dengan sistem keamanan terbaik dan enkripsi data. Transaksi yang cepat, aman, dan terpercaya merupakan jaminan dari OLXTOTO. Nikmati layanan situs toto terbaik dari OLXTOTO dengan tampilan yang user-friendly dan mudah digunakan. Layanan pelanggan tersedia 24/7 untuk membantu para member. Bergabunglah dengan OLXTOTO sekarang untuk merasakan pengalaman bermain togel yang menyenangkan dan menguntungkan.
    • Baba  Serege [[+27-73 590 8989]] has experience of 27 years in helping and guiding many people from all over the world. His psychic abilities may help you answer and resolve many unanswered questions. He specialize in helping women and men from all walks of life.. 1) – Bring back lost lover. even if lost for a long time. 2) – My lover is abusing alcohol, partying and cheating on me I urgently need help” 3) – Divorce or court issues. 4) – Is your love falling apart? 5) – Do you want your love to grow stronger? 6) – Is your partner losing interest in you? 7) – Do you want to catch your partner cheating on you? – We help to keep your partner faithful and loyal to you. 9) – We recover love and happiness when relationship breaks down. 10) – Making your partner loves you alone. 11) – We create loyalty and everlasting love between couples. 12) – Get a divorce settlement quickly from your ex-partner. 13) – We create everlasting love between couples. 14) – We help you look for the best suitable partner. 15) – We bring back lost lover even if lost for a long time. 16) – We strengthen bonds in all love relationship and marriages 17) – Are you an herbalist who wants to get more powers? 18) – Buy a house or car of your dream. 19) – Unfinished jobs by other doctors come to me. 20) – I help those seeking employment. 21) – Pensioners free treatment. 22) – Win business tenders and contracts. 23) – Do you need to recover your lost property? 24) – Promotion at work and better pay. 25) – Do you want to be protected from bad spirits and nightmares? 26) – Financial problems. 27) – Why you can’t keep money or lovers? 28) – Why you have a lot of enemies? 29) – Why you are fired regularly on jobs? 30) – Speed up money claim spell, delayed payments, pension and accident funds 31) – I help students pass their exams/interviews. 33) – Removal of bad luck and debts. 34) – Are struggling to sleep because of a spiritual wife or husband. 35- ) Recover stolen property
  • Topics

×
×
  • Create New...

Important Information

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