Jump to content

Recommended Posts

Posted

I'm trying to get my mod to work on servers, but its generating NoClassDefFound errors. Here's the report my coding partner gets:

 

  Reveal hidden contents

 

And the one I get from running MCP's startserver.bat:

 

  Reveal hidden contents

 

 

If you need to see any code just ask, I haven't posted any yet because I have no clue what part of it to post. I assume somewhere in my mod is referencing WorldClient or Render, but I haven't found any occurrences of either. What's going on and how do we fix it? Thanks.

Posted
  On 6/24/2013 at 8:46 PM, twixthehero said:

It looks like those classes have invalid sides attached to them.  "@SideOnly(Side.SERVER)"

 

Have you modified those two classes at all?

Nope, they have not been modified at all and both have side only annotations for the client side on them.

Posted

Those annotations are not invalid. They are there for this exact reason.

You have a hard reference to client side classes in your mod.

You need to stop doing that.

You may not be referencing those classes directly but you may have subclasses of them referenced.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

My client proxy references net.minecraft.client.renderer.entity.RenderSnowball, a subclass of Render. This is the only reference to it in my mod, so I assume my proxy setup might be wrong. I'll post and see if anyone can help it.

 

CommonProxy

package com.willdabeast509.flintlocks.proxy;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;

import com.willdabeast509.flintlocks.cannon.ContainerCannon;
import com.willdabeast509.flintlocks.cannon.GuiCannon;
import com.willdabeast509.flintlocks.cannon.TileEntityCannon;

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

public class CommonProxy
{
public void registerRenderers()
{

}
}

 

ClientProxy

package com.willdabeast509.flintlocks.proxy;

import net.minecraft.client.renderer.entity.RenderSnowball;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;

import com.willdabeast509.flintlocks.mod_flintlocks;
import com.willdabeast509.flintlocks.cannon.GuiCannon;
import com.willdabeast509.flintlocks.cannon.TileEntityCannon;
import com.willdabeast509.flintlocks.entities.EntityCannonball;
import com.willdabeast509.flintlocks.entities.EntityDummy;
import com.willdabeast509.flintlocks.entities.EntityGrapeshot;
import com.willdabeast509.flintlocks.entities.EntityHandCannonball;
import com.willdabeast509.flintlocks.entities.EntityHeatshot;

import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class ClientProxy extends CommonProxy
{
@Override
public void registerRenderers()
{
	RenderingRegistry.registerEntityRenderingHandler(EntityCannonball.class, new RenderSnowball(mod_flintlocks.Cannonball));
	RenderingRegistry.registerEntityRenderingHandler(EntityHandCannonball.class, new RenderSnowball(mod_flintlocks.Cannonball));
	RenderingRegistry.registerEntityRenderingHandler(EntityHeatshot.class, new RenderSnowball(mod_flintlocks.Heatshot));
	RenderingRegistry.registerEntityRenderingHandler(EntityGrapeshot.class, new RenderSnowball(mod_flintlocks.grape));
	RenderingRegistry.registerEntityRenderingHandler(EntityDummy.class, new RenderSnowball(mod_flintlocks.dummyrender));
}
}

 

mod_flintlocks, the sections pertaining to the proxies

@Mod(modid = "Flintlock_Guns", name = "Flintlock Guns Mod", version = "1.6_1")
@NetworkMod(clientSideRequired = true, serverSideRequired = false, channels={"test","guibuttons","requestgui","playfuse","playex"},packetHandler = PacketHandler.class)

public class mod_flintlocks
{
        @SidedProxy(clientSide="com.willdabeast509.flintlocks.proxy.ClientProxy", serverSide="com.willdabeast509.flintlocks.proxy.CommonProxy")
public static CommonProxy proxy;

        @Init
public void load(FMLInitializationEvent e)
{
                proxy.registerRenderers();
         }
}

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.