Jump to content

[1.6.4][Forge]Server error


MONOBLOK

Recommended Posts

My mod does not work on the server. What's wrong with my code?

Error:

 

[iNFO] Starting minecraft server version 1.6.4

[sEVERE] Encountered an unexpected exception NoClassDefFoundError

java.lang.NoClassDefFoundError: net/minecraft/client/renderer/tileentity/TileEntitySpecialRenderer

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

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

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

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

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

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

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

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

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

at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:99)

at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:350)

at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:69)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445)

at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)

Caused by: java.lang.ClassNotFoundException: net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer

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

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

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

... 30 more

Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/renderer/tileentity/TileEntitySpecialRenderer for invalid side SERVER

at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:50)

at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:274)

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

... 32 more

 

 

 

main class

@Mod (modid = Info.ID, name = Info.NAME, version = Info.VERSION)
@NetworkMod(clientSideRequired=true, serverSideRequired=false) 


public class BaseClassMod {
 @SidedProxy(clientSide = "mbk.mods.heavy_engine.proxi.ClientProxy", serverSide = "mbk.mods.heavy_engine.proxi.CommonProxy")
 public static CommonProxy proxy;
 public static Block blockGorn ;
 public static Block blockCrucible ;
 public static Block blockBellow;


 public static int BlockGornBlockID;
 public static int BlockCrucibleBlockID;
 public static int BlockBellowBlockID;


 public static int renderBlockGornID;
 public static int renderBlockCrucibleID;
 public static int renderBlockBellowID;

static CreativeTabs tabMod = new TabMod(CreativeTabs.getNextID(),Info.NAME);



 @Instance(Info.ID)
     public BaseClassMod instance;

     // Mark this method for receiving an FMLEvent (in this case, it's the FMLPreInitializationEvent)
     @EventHandler public void preInit(FMLPreInitializationEvent event)
     {
    	 int beginBlockID=4020;
    	 
    	
    	 
    	 Configuration config = new Configuration(event.getSuggestedConfigurationFile());
    	 config.load();
    	
    	 BlockCrucibleBlockID = config.getBlock("BlockCrucible",  beginBlockID++).getInt();
    	 BlockGornBlockID = config.getBlock("BlockGorn", beginBlockID++).getInt();
    	 BlockBellowBlockID = config.getBlock("BlockBellow",  beginBlockID++).getInt();
    	 config.save();
    	 
     }
     
     @EventHandler
     public void init(FMLInitializationEvent event)
     {
    	 
    	
    	 blockCrucible = new BlockCrucible(BlockCrucibleBlockID, true).setCreativeTab(BaseClassMod.tabMod).setHardness(0.0F).setUnlocalizedName("BlockCrucible");
    	 blockGorn = new BlockGorn(BlockGornBlockID, true).setCreativeTab(BaseClassMod.tabMod).setHardness(0.0F).setUnlocalizedName("BlockGorn");
    	 blockBellow = new BlockBellow(BlockBellowBlockID, true).setCreativeTab(BaseClassMod.tabMod).setHardness(0.0F).setUnlocalizedName("BlockBellow");
    	 
    	 GameRegistry.registerBlock(blockCrucible,"BlockCrucible");
    	 GameRegistry.registerBlock(blockGorn, "BlockGorn");
    	 GameRegistry.registerBlock(blockBellow, "BlockBellow");
    	 
    	
    	 
    	 GameRegistry.registerTileEntity( mbk.mods.heavy_engine.blocks.TileEntity.TileEntityCrucible.class, "TileEntityBlockCrucible" );
    	 GameRegistry.registerTileEntity( mbk.mods.heavy_engine.blocks.TileEntity.TileEntityGorn.class, "TileEntityBlockGorn" );
    	 GameRegistry.registerTileEntity( mbk.mods.heavy_engine.blocks.TileEntity.TileEntityBellow.class, "TileEntityBlockBellow" );
    	 
    	 ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCrucible.class, new RendererCrucible());
    	 ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGorn.class, new RendererGorn());
    	 ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBellow.class, new RendererBellow());
    	 
    	 renderBlockCrucibleID = RenderingRegistry.getNextAvailableRenderId();
    	 renderBlockGornID = RenderingRegistry.getNextAvailableRenderId();
    	 renderBlockBellowID = RenderingRegistry.getNextAvailableRenderId();
    	 
    	 RenderingRegistry.registerBlockHandler(renderBlockCrucibleID, new HandlerCrucible());
    	 RenderingRegistry.registerBlockHandler(renderBlockGornID, new HandlerGorn());
    	 RenderingRegistry.registerBlockHandler(renderBlockBellowID, new HandlerBellow());
    	 
    	 proxy.registerRenderers();
     }


}

 

ClientProxy:

public class ClientProxy extends CommonProxy
{

 @Override

     public void registerRenderers() {
	 renderBlockBellowID = RenderingRegistry.getNextAvailableRenderId();
         RenderingRegistry.registerBlockHandler(renderBlockBellowID, new HandlerBellow());
         ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBellow.class, new RendererBellow());


	 renderBlockCrucibleID = RenderingRegistry.getNextAvailableRenderId();
         RenderingRegistry.registerBlockHandler(renderBlockCrucibleID, new HandlerCrucible());
	 ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCrucible.class, new RendererCrucible());

	 renderBlockGornID = RenderingRegistry.getNextAvailableRenderId();
         RenderingRegistry.registerBlockHandler(renderBlockGornID, new HandlerGorn());
	 ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGorn.class, new RendererGorn());

     }
}

CommonProxy:

public class CommonProxy {
public static int renderBlockBellowID;
public static int renderBlockCrucibleID;
public static int renderBlockGornID;
public void registerRenderers() {
         // Nothing here as the server doesn't render graphics or entities!

}
}

Renderer file:

@SideOnly(Side.CLIENT)
public class RendererBellow extends TileEntitySpecialRenderer
{
  
   private   ModelBellow model;
  

   private ResourceLocation TEXTURE;

   public RendererBellow()
   {
	  
      model = new ModelBellow();
     
      
   }

   public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f)
   {
	  
	  
      this.renderTileEntity((TileEntityBellow)tileEntity, x, y, z, f);
   }

   public void renderTileEntity(TileEntityBellow tileEntity, double x, double y, double z, float f)
   {
	   int metadata =0;
	   if(tileEntity.worldObj != null){
		   metadata = tileEntity.getBlockMetadata();
	   }
	  
	   
	   int rotationAngle = 0;
	   if(metadata%4 == 0 ){
	    rotationAngle = 270;
	   }
	   if(metadata%4 == 1 ){
	    rotationAngle = 90;
	   }
	   if(metadata%4 == 2 ){
	    rotationAngle = 0;
	   }
	   if(metadata%4 == 3 ){
	    rotationAngle = 180;
	   }
	  
	   GL11.glPushMatrix();
	   GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
	   GL11.glPushMatrix();
	   GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
	   GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F);    	
	   this.TEXTURE = new ResourceLocation("heavy_engine", "textures/blocks/Bellow.png");
       this.bindTexture(TEXTURE);
       //Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
      
       this.model.activ(tileEntity.getActiv());
      
       
       
       this.model.render();
      
      
      

       GL11.glPopMatrix();
       GL11.glPopMatrix();
   }
   
   
}

Link to comment
Share on other sites

Capture.png

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

I apologize, my native language is not English. I understand that my code in the above lines is crazy. I was in despair (Tutorials not help me) when I wrote these lines (renderBlockBellowID = RenderingRegistry.getNextAvailableRenderId()...) in proxy, I saw them in the same solution in the forums.

 

What exactly do I have to register for the custom model block in the proxy?

Link to comment
Share on other sites

Thank you very much. I think I understand the concept of client-server, rewrote the code and server running. However, sometimes I have warning when creating a new world:

[WARNING] [Minecraft-Client] Memory connection overburdened; after processing 2500 packets, we still have 680 to go!

What does it mean?

Link to comment
Share on other sites

Unless the xxx to go number gets larger with each printing of it, there's nothing to worry about.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.



×
×
  • Create New...

Important Information

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