Posted May 2, 201312 yr I'm working on a server-side mod but I can't figure out how to debug it. When I run "startserver.bat" and then start the client through Eclipse in debug mode, it tells me that "the mod testBlocks was not found on the server"... I've tried the following: @NetworkMod(clientSideRequired=false, serverSideRequired=true) @NetworkMod(clientSideRequired=true, serverSideRequired=true) but for whatever reason, the server doesn't see the mod's source code.
May 2, 201312 yr Eclipse has a server launcher, also you have the @Mod annotation and don't have a stray @SideOnly(Side.CLIENT) correct? I think its my java of the variables.
May 2, 201312 yr Author Eclipse has a server launcher, also you have the @Mod annotation and don't have a stray @SideOnly(Side.CLIENT) correct? I do have the @Mod annotation and I actually don't have any Side.CLIENT yet and I have @NetworkMod with clientSideRequired=false, serverSideRequired=true. Also I assume when you say Eclipse has a launcher that you're not talking about the batch file?
May 2, 201312 yr Click Minecraft package, Run->Run as->Java Application, then choose Minecraft Server from menu http://imageshack.us/a/img707/2757/senitielsspacemarinemod.png[/img]
September 10, 201312 yr Author I know this is an old topic but it's still relevant since I actually took a break from modding. I'm unable to get the server running in Eclipse because in my modLoad() function it crashes when it tries to create an instance of my block: smartlightBlock = new BlockSmartLight(cfg.getBlockId(false), false); cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient
September 10, 201312 yr I believe that the server doesn't actually handle blocks/items and such... Don't quote me on that though. I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes. I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there
September 10, 201312 yr Author I believe that the server doesn't actually handle blocks/items and such... Don't quote me on that though. That may be true, not sure myself. I technically don't want to debug the server. What I want to do is debug my mod while connected to a server. Problem is I can't start the server through Eclipse and if I start the server with "startserver.bat" (in the MCP folder) and then run the client through Eclipse it can't connect due to "missing mods". I don't see how I could be missing mods since the MCP server only runs Forge which is also what's running in Eclipse.
September 10, 201312 yr Try this and see if this works for you: Save all the code and run the client to make sure it compiles and runs in SSP mode. Exit. Open the command prompt/shell etc and go into the forge/mcp directory and run the recompile script, then the reobsfucate script. After doing that you can run the server from eclipse and then start the client from eclipse afterwards and connect to the server.
September 10, 201312 yr In Eclipse next to the run button there should be a little down arrow ( right hand side of the button ). Click that and it will do a drop down menu with two options, Client and Server ( Note this is only when in the MCP environment ). All you have to do is click the Server option and it will launch the server. Then, once it is running, click that arrow again and run the client in debug mode ( using the arrow to the right of the debug option of course ) and then connect to the server. Easily done. I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes. I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there
September 10, 201312 yr Author @Axlen Thanks but I was looking to be able to test without having to compile, reobfuscate, etc. @Mew Right, that's when it crashes. As soon as I launch the server from within Eclipse it throws the NoClassDefFoundError about "WorldClient" that I mentioned earlier. It is pointing to my mod's base file at the line that creates the "new BlockSmartLight()". Strange thing is that in my constructor I don't do anything except set the creative tab.
September 11, 201312 yr Check your imports. Sometimes the client only class is called here. Also check that you never do Minecraft.theWorld when in a common class.
September 11, 201312 yr Author Check your imports. Sometimes the client only class is called here. Also check that you never do Minecraft.theWorld when in a common class. Thanks for the advice, will check my code when I get a few minutes.
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.