Jump to content

Basic Modding Help


SoldierW518
 Share

Recommended Posts

Hello, I was working on my mod and I was following the tutorial at (http://www.minecraftforge.net/wiki/Basic_Modding) and I tried to run it and got this error.

 

 

2013-06-09 16:27:21 [sEVERE] [ForgeModLoader] An error occured trying to load a proxy into {clientSide=SoldierW518.Soldiers_Mod.Client, serverSide=SoldierW518.Soldiers_Mod.CommonProxy}.SoldierW518.Soldiers_Mod.Soldiers_Mod

java.lang.ClassNotFoundException: SoldierW518.Soldiers_Mod.Client

at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:238)

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

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

at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:56)

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

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

at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:58)

at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:471)

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.EventHandler.handleEvent(EventHandler.java:74)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

at com.google.common.eventbus.EventBus.post(EventBus.java:267)

at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:186)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:166)

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.EventHandler.handleEvent(EventHandler.java:74)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

at com.google.common.eventbus.EventBus.post(EventBus.java:267)

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:103)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:504)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:163)

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

at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)

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

at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.NullPointerException

at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:227)

... 34 more

2013-06-09 16:27:21 [sEVERE] [ForgeModLoader] Fatal errors were detected during the transition from CONSTRUCTING to PREINITIALIZATION. Loading cannot continue

2013-06-09 16:27:21 [sEVERE] [ForgeModLoader]

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

FML{5.2.21.729} [Forge Mod Loader] (coremods) Unloaded->Constructed

Forge{7.8.0.729} [Minecraft Forge] (coremods) Unloaded->Constructed

Soldiers_Mod{1.0} [soldiers Mod] (bin) Unloaded->Errored

2013-06-09 16:27:21 [sEVERE] [ForgeModLoader] The following problems were captured during this phase

2013-06-09 16:27:21 [sEVERE] [ForgeModLoader] Caught exception from Soldiers_Mod

cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: SoldierW518.Soldiers_Mod.Client

at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:75)

at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:471)

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.EventHandler.handleEvent(EventHandler.java:74)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

at com.google.common.eventbus.EventBus.post(EventBus.java:267)

at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:186)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:166)

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.EventHandler.handleEvent(EventHandler.java:74)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

at com.google.common.eventbus.EventBus.post(EventBus.java:267)

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:103)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:504)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:163)

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

at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)

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

at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.ClassNotFoundException: SoldierW518.Soldiers_Mod.Client

at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:238)

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

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

at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:56)

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

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

at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:58)

... 28 more

Caused by: java.lang.NullPointerException

at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:227)

... 34 more

 

I also have the code for here:

 

Soldiers_Mod.java:

package SoldierW518.Soldiers_Mod;

 

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.Init;

import cpw.mods.fml.common.Mod.Instance;

import cpw.mods.fml.common.Mod.PostInit;

import cpw.mods.fml.common.Mod.PreInit;

import cpw.mods.fml.common.SidedProxy;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.event.FMLPostInitializationEvent;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;

import cpw.mods.fml.common.network.NetworkMod;

 

@Mod(modid="Soldiers_Mod", name="Soldiers Mod", version="1.0")

@NetworkMod(clientSideRequired=true, serverSideRequired=false)

public class Soldiers_Mod {

 

@Instance("Soldiers_Mod")

    public static Soldiers_Mod instance;

 

@SidedProxy(clientSide="SoldierW518.Soldiers_Mod.Client", serverSide="SoldierW518.Soldiers_Mod.CommonProxy")

public static CommonProxy proxy;

 

@PreInit

public void preInit(FMLPreInitializationEvent event) {

 

}

 

@Init

public void load(FMLInitializationEvent event) {

proxy.registerRenderers();

}

 

@PostInit

public void postInit(FMLPostInitializationEvent event) {

 

}

 

}

 

CommonProxy.java:

 

package SoldierW518.Soldiers_Mod;

 

public class CommonProxy {

public static String ITEMS_PNG = "/SoldierW518/Soldiers_Mod/items.png";

public static String BLOCK_PNG = "/SoldierW518/Soldiers_Mod/block.png";

 

public void registerRenderers() {

 

}

}

 

ClientProxy.java:

 

package SoldierW518.Soldiers_Mod.Client;

 

import net.minecraftforge.client.MinecraftForgeClient;

import SoldierW518.Soldiers_Mod.CommonProxy;

 

public class ClientProxy extends CommonProxy{

 

@Override

public void registerRenderers() {

MinecraftForgeClient.preloadTexture(ITEMS_PNG);

MinecraftForgeClient.preloadTexture(BLOCK_PNG);

}

 

}

 

If anyone could help me out I would greatly appreciate it.

 

Thanks for Reading,

 

- Justin (SoldierW518)

Link to comment
Share on other sites

On your @SidedProxy

it is declared that it can't find the class named Client.class, which you have named ClientProxy.class.

Easy fix:                                                                  V V V V V V V  FIX RIGHT THERE

 

@SidedProxy(clientSide="SoldierW518.Soldiers_Mod.ClientProxy", serverSide="SoldierW518.Soldiers_Mod.CommonProxy")
   public static CommonProxy proxy;

 

Old Code:

@SidedProxy(clientSide="SoldierW518.Soldiers_Mod.Client", serverSide="SoldierW518.Soldiers_Mod.CommonProxy")
   public static CommonProxy proxy;

 

New Code:

@SidedProxy(clientSide="SoldierW518.Soldiers_Mod.ClientProxy", serverSide="SoldierW518.Soldiers_Mod.CommonProxy")
   public static CommonProxy proxy;

 

Link to comment
Share on other sites

Thank you very much for showing me where I had an error in my code! But, this didn't fix it. I had to do this.

 

@SidedProxy(clientSide="SoldierW518.Soldiers_Mod.Client.ClientProxy", serverSide="SoldierW518.Soldiers_Mod.CommonProxy")

public static CommonProxy proxy;

 

Because my package that the ClientProxy was in was called "SoldierW518.Soldiers_Mod.Client.ClientProxy" but still Thank you SO much for at least showing me where I made a mistake which made me look at the code and figure out what I did wrong.

 

Thank you very much for reading,

 

- Justin (SoldierW518)

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

 Share



×
×
  • Create New...

Important Information

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