Jump to content

Help
Latest News Article

[SMP Mods] ModLoaderMp Modding [31/05/11]


508 replies to this topic

#1

Posted 31 May 2011 - 02:38 PM

*
POPULAR

Welcome to my guide on ModLoaderMp modding. So many people have asked me how to make SMP mods that I decided to write down all I know in a nice organised tutorial. This tutorial assumes that you have made a single player mod and wish to add multiplayer support to said mod.

ModLoaderMp should be available from SDK's topic here :
http://www.minecraft...t/topic/86765-/

However, if he has not updated it, I try to maintain my own unofficial version on my mod page here :
http://www.minecraft...ic/182918-/#MLM

If you are having trouble, please contact me by one of the following methods
Post in this thread
Send me a PM
Join the #risucraft channel on irc.esper.net and ask for help from me, SDK or anyone else

Okay, so here we go.

Step 1 : Install ModLoaderMp with MCP

USE A NEW MCP FOLDER : You dont want to wipe your mod source now do you?

Open the new MCP folder
Go to jars and add a clean minecraft_server.jar
Open this minecraft_server.jar and add ModLoaderMp server
In the jars folder add the resources and bin folders of a clean minecraft install.
Open jars/bin/minecraft.jar and add the latest ModLoader and ModLoaderMp Client

If you get an exception2; error look at the following spoiler on how to fix it. If not, skip the spoiler.

Spoiler

Recompile to check everything compiles nicely. If not, please contact me for help.
Note : The client will not be able to connect to the server unless there is a multiplayer mod installed. So just check it compiles at the moment.

Step 2 : Add mod source to new MCP

Go to your old singleplayer MCP folder and navigate to your source (MCP\src\minecraft\net\minecraft\src)
Copy your source and any edited notch classes over to the same folder in the new MCP
Open any mod_ files and change the class to extend BaseModMp rather than BaseMod
Copy the source from this folder to MCP\src\minecraft_server\net\minecraft\src in the new MCP
(DO NOT copy notch classes over. You have to open the corresponding classes in the server folder and edit them yourself)
Note that Model, Render and Gui classes are not required server side

At this point, some mods may be ready to compile, others may need some modifying. If your mod adds entities or guis, you will need to change some things. If your mod is simple and contains only blocks, items and recipes, continue to step 5

Step 3 : Fix Entities

This is in two parts (mobs and other entities; skip to the appropriate part)

Part 1 : Mobs

Mobs in SMP are very simple. Take the following line :
ModLoader.RegisterEntityID(EntityClass.class, "EntityName", ModLoader.getUniqueEntityID());

And turn it into
ModLoader.RegisterEntityID(EntityClass.class, "EntityName", ID);

Where ID is a number (under 128) you choose to represent your mob.

Make the change on both client and server (with the same ID) and your mob should work.

Note that the server side mob must implement IAnimal if it doesn't extend EntityMob or EntityAnimal.

Part 2 : Other Entities

Most entities are created by a vehiclespawn packet and controlled by various movement and position packets.
If your entity class contains worldObj.multiplayerWorld at any point, you need to change it to worldObj.singleplayerWorld
There may be other errors with your entities depending on how complicated they are and on differing client/server names but you will have to fix these yourself or ask a modder for help

To register your entity with ModLoaderMp's entity tracker you need to add some lines client and server side
Firstly, you need to choose a netID, which is basically an identifier for your entity (a bit like a block ID). It should be some number under 256

In the client side mod_ constructor
ModLoaderMp.RegisterNetClientHandlerEntity(Entity____.class, netID);
Where Entity_____.class is the class of the entity being tracked and netID is the entity's netID

And in the server side mod_ constructor
ModLoaderMp.RegisterEntityTrackerEntry(Entity_____.class, netID);
ModLoaderMp.RegisterEntityTracker(Entity______.class, 160, 5);
Entity____.class and netID are the same as before. 160 is some arbitrary number and I can't remember what its for. 5 is how often to update (so this mod updates once every 5 ticks, or 4 times a second).

That should be enough to get your entities working with ModLoaderMp.

Step 4 : Fix Guis

To make an SMP gui you are going to need to change the Gui calling code server side and add a method client side to handle the GUI. You will also need a GUI ID so pick some number less than 128.

On the server (in the entity / tileEntity / block where the gui is created) you need to change the method call to this format
ModLoader.OpenGUI(player, guiID, inventory, container);
where player is the player who is opening the GUI,
guiID is the ID you chose
inventory is the inventory you are editing (the dispenser / minecart / plane for example)
container is the slot interface you are using (ContainerChest for example)

Client side we need to add a line in the mod_ constructor
ModLoaderMp.RegisterGUI(this, guiID);
and to the mod_ class, we must add a new method.
	public GuiScreen HandleGUI(int inventoryType)
	{
		if(inventoryType == guiID)
			return new Gui_____(args);
		else return null;
	}
Where Gui_________ is the name of your GUI class and args are the arguments for the gui. ModLoader.getMinecraftInstance().thePlayer can be very useful here.

That should fix your GUI, but if not, please do ask me for help.

Step 5 : Recompile

A few last things before recompiling; go to the serverside mod_ file and delete any lines that use the method ModLoader.AddName(... and the entire AddRenderer(Map map) method if you have one.
Run recompile.bat and see if you get any errors. If you can figure them out yourself and fix them, great, but if you can't, please contact me.
Now run test_server.bat and test_game.bat, connect to 127.0.0.1 and see how it went.

When everything works to your satisfaction, re-obfuscate and distribute.
Posted Image

Register or log in to remove.

#2

Posted 31 May 2011 - 02:39 PM

Additional Features of ModLoaderMp

Custom packets

With ModLoaderMp, you can send custom packets to and from the client and server with any data you like. All custom packet handling is done by the mod_ files both server and client so if entities need to send packets, they have to call the mod_ file.

How to create a packet with various bits of data
First, pack all your data into a float / int / string array

float[] dataFloat = new float[numberOfFloats];
dataFloat[0] = someFloat;
dataFloat[1] = anotherFloat;
...

int[] dataInt = new int[numberOfInts];
dataInt[0] = someInt;
dataInt[1] = anotherInt;
...

String[] dataString = new String[numberOfStrings];
dataString[0] = someString;
dataString[1] = anotherString;
...

Now create a Packet230ModLoader and put your data in it. Note that you have to set its packetType. This value is completely up to you and is used to determine what is in the packet. For example, you could have packetType = 0 as updateFlagColour and packetType = 1 as sendFlak (two examples from teams and planes)

Packet230ModLoader packet = new Packet230ModLoader();
packet.packetType = 0;
packet.dataFloat = dataFloat;
packet.dataInt = dataInt;
packet.dataString = dataString;

Here is an example of the entire method
Spoiler

Now your packet is ready to be sent, and there are various ways you can do this.
On the client, your only option is ModLoaderMp.SendPacket(this, packet); but on the server you can use ModLoaderMp.SendPacketToAll(this, packet); or ModLoaderMp.SendPacketTo(this, player, packet); where player is the player you are sending the packet to.

Handling the received packet on the other end is quite simple
In your mod_ file add a method similar to this one
For the client
public void HandlePacket(Packet230ModLoader packet)
	{
		switch(packet.packetType)
		{
			case 0:
			{
				//do some stuff with the packet
				//you can use packet.dataFloat[] etc
			}
		}

	}

And for the server
public void HandlePacket(Packet230ModLoader packet, EntityPlayerMP player)
	{
		switch(packet.packetType)
		{
			case 0:
			{
				//do some stuff with the packet
				//you can use packet.dataFloat[] etc
				//and player
			}
		}

	}

And that is how to make custom packets.

SendKey

If you want to set up a key that does something for your mod (such as open an vehicle's inventory or open a GUI) you can use SendKey and HandleSendKey.

Sending the key from the client side mod_ file is very simple.
ModLoaderMp.SendKey(instance, key);

instance is a static instance of the mod_ file. key is a keycode.
A list of keycodes are avaliable here

Alternatively you can use
Keyboard.KEY_ ...
remembering the import line
import org.lwjgl.input.Keyboard;

In the server mod_ file you will need the following method.
	public void HandleSendKey(EntityPlayerMP player, int key)
	{
	}

Where player is the player who pressed the key and key is the keycode.
If you wish for people to configure their keys, you can have the key they choose be converted to the standard keys before you send the key.

Command Handling

ModLoaderMp now contains the functionality to add operator commands and server console commands. To add a command you need to add two methods to your server side mod_ file, and possibly a third if this is a server only mod.

getCommandInfo is purely there to send information to the server console / client about what commands are available to them. (Server does not support sending multiple pages of commands yet so it may print too much for the client)

	public void GetCommandInfo(ICommandListener icommandlistener) 
	{ 
		icommandlistener.log("MpUtils : Op only commands");
		icommandlistener.log("   i <id> [num] [meta]       gives you [num] of <id> with damage [meta]");
		icommandlistener.log("   heal                      heals you to full health");
		icommandlistener.log("   warp <x> <y> <z>	       moves you to x,y,z");
	}

HandleCommand is the much more important of the two methods and it controls the commands being sent to the server.

	public boolean HandleCommand(String command, String username, Logger logger, boolean isOp) 
	{ 
	{ 
	}

command is the string the player/console sent to the server excluding the "/".
username is the player username or "CONSOLE".
logger is the logger/message creator that tells other players which command has been used.
isOp is a boolean that is true if the player issuing the command is an Operator or if the console issued the command.

Now you must put together some code to handle your commands. The easiest way to detect what command has been sent is to use a series of if else statements. This line looks to see if the command starts "command " so you need to change "command " to the name of your command.
	if(command.toLowerCase().startsWith("command "))
        {

Almost all commands take multiple arguments, so you're going to need to split the command string into bits. You can do this by using these lines. Here we split the command by the spaces and then test its length. If it does not have two parts, we return false, i.e. we tell ModLoaderMp that we could not handle the command.

            String commandSplit[] = command.split(" ");
            if(commandSplit.length != 2)
            {
                return false;
            }

You can then use the string array commandSplit[] to do whatever you want.
When your command encounters an error, such as the following, you should use the following method. The StringBuilder takes the string "There's no item with id " and adds the item id (which came from a commandSplit) to the end, not forgetting toString()

logger.fine((new StringBuilder()).append("There's no item with id ").append(itemID).toString());

When your command has been handled successfully you should return true; but before that, it is good practice to tell the ops who did what.

ModLoaderMp.sendChatToOps(username, (new StringBuilder()).append("Giving ").append(player.username).append(" some ").append(itemID).toString());

Another useful little method you might need when you have created your commands is hasClientSide(). This defaults to true, but if you have made a server only mod that simply handles commands, you will want to use this method.

	public boolean hasClientSide()
    {
      	return false;
    }

Posted Image

#3

Posted 31 May 2011 - 09:08 PM

Great tutorial, more efficient than the workaround method I posted yesterday to get them to compile. :P

One quick request, though; I've run across that note to remove certain lines from the server.jar before decompiling, but my preferred editor doesn't have line listing. Could you perchance paste what the default code for those lines is to easily find and replace them for us lineless folk? :D

EDIT: Here's the lines you want to search for and replace:

            finally
            {
                System.exit(0);
            }
            break MISSING_BLOCK_LABEL_350;
        }
        try
        {
            stopServer();
            serverStopped = true;
        }
        catch(Throwable throwable)
        {
            throwable.printStackTrace();
        }
        finally
        {
            System.exit(0);
        }
        break MISSING_BLOCK_LABEL_350;
        Exception exception2;
        exception2;
        try
        {
            stopServer();
            serverStopped = true;
        }
        catch(Throwable throwable3)
        {
            throwable3.printStackTrace();
        }
        finally
        {
            System.exit(0);
        }
        throw exception2;
    }


#4

Posted 03 June 2011 - 09:24 PM

I'm french, so excuse me if my english is bad :unsure:

I followed exactly your tutorial and all seemed to be ok, but when I try to connect to localhost, Minecraft says me "Internal exception: java.io.IOException: Bad packet id 230" :(

Here is the content of the console :

[23:09] Connecting to 127.0.0.1, 25565
[23:09] java.io.IOException: Bad packet id 230
[23:09] at net.minecraft.src.Packet.readPacket(Packet.java:97)
[23:09] at net.minecraft.src.NetworkManager.readPacket(NetworkManager.java:125)
[23:09] at net.minecraft.src.NetworkManager.readNetworkPacket(NetworkManager.jav
a:235)
[23:09] at net.minecraft.src.NetworkReaderThread.run(NetworkReaderThread.java:30

I looked at the lines quoted, but I don't see where is the error.
Did someone get this problem and did he find the solution ?

#5

  • Location: France
  • Minecraft: sampuig12

Posted 03 June 2011 - 10:18 PM

Great tutorial thanks, Will you make Singleplayer Mod Tutorial when SMP finished ?
Posted Image

#6

Posted 04 June 2011 - 11:31 AM

View PostChampitoad, on 03 June 2011 - 09:24 PM, said:

I'm french, so excuse me if my english is bad :unsure:

I followed exactly your tutorial and all seemed to be ok, but when I try to connect to localhost, Minecraft says me "Internal exception: java.io.IOException: Bad packet id 230" :(

Here is the content of the console :

[23:09] Connecting to 127.0.0.1, 25565
[23:09] java.io.IOException: Bad packet id 230
[23:09] at net.minecraft.src.Packet.readPacket(Packet.java:97)
[23:09] at net.minecraft.src.NetworkManager.readPacket(NetworkManager.java:125)
[23:09] at net.minecraft.src.NetworkManager.readNetworkPacket(NetworkManager.jav
a:235)
[23:09] at net.minecraft.src.NetworkReaderThread.run(NetworkReaderThread.java:30

I looked at the lines quoted, but I don't see where is the error.
Did someone get this problem and did he find the solution ?

I did say that it wont run after recompiling. The client has no multiplayer mods so ModLoaderMp on the client does not start up. Therefore the client does not recognise Packet 230
Posted Image

#7

Posted 04 June 2011 - 12:27 PM

I thought that install my mod on another minecraft than MCP would be functional, but I have to install a pre-existent multiplayer mod like SDK's gun. Now it runs, so thank you very much jamioflan for this great tutorial :)

#8

    lKinx

    Obsidian Miner

  • Members
  • 1314 posts
  • Minecraft: KyMackin

Posted 04 June 2011 - 02:51 PM

View PostChampitoad, on 04 June 2011 - 12:27 PM, said:

I thought that install my mod on another minecraft than MCP would be functional, but I have to install a pre-existent multiplayer mod like SDK's gun. Now it runs, so thank you very much jamioflan for this great tutorial :)

I didn't understand a word you said, but whatever works for you. :P
Posted Image

#9

Posted 04 June 2011 - 03:49 PM

It's simply awesome, thanks !

#10

Posted 04 June 2011 - 04:16 PM

I just have a question :

When I reobfuscate, MCP create a lot of .class in reobf/minecraft, and it obfuscate all the classes in reobf/minecraft_server :blink: , so I don't know exactly which .class take.

Is this normal ?

#11

  • Location: The Netherlands
  • Minecraft: CsprBzmr

Posted 06 June 2011 - 02:57 PM

The modded minecraft.jar 1.6.6 and minecraft_server.jar 1.6.6 files do not seem to recompile correctly! I get 28 errors in the client, and 1 in the server.
(Installed ModLoaderMP on both server and client, and regular ModLoader on client.)

Is anyone else having problems? :o

EDIT: Never mind, turned out I was using an old Modloader. -.-
My name is Casper Bezemer, hence CsprBzmr (removed the vowels).
Just thought I'd get that out there... Yeeaah.

#12

  • Minecraft: cheeseguy64

Posted 06 June 2011 - 05:47 PM

Could you also do a Bukkit tutorial, or are the codes the same?
Y'arr, I'm now a pirate. The powers of the imagination never cease to amaze me.

#13

  • Location: The Netherlands
  • Minecraft: CsprBzmr

Posted 08 June 2011 - 03:06 PM

I don't really understand how the keysending works. I added the handleSendKeys method to my mod_ file, but how do I get my Entities to use this data?
Could you be a bit more specific on how this works? :D
My name is Casper Bezemer, hence CsprBzmr (removed the vowels).
Just thought I'd get that out there... Yeeaah.

#14

  • Location: usa
  • Minecraft: smokedogg

Posted 09 June 2011 - 03:56 AM

this worked almost 100 percent for me. Ive made a mod that adds 140 things all work except the worldgenhell class file it doesnt like that hehe if i have nether ores generating will they have to go in the default nether world gen class for the server end anyway? its not a big deal cause i add over 20 blocks only 8 in the nether but would be sweet if i could get it to work if you need me to ill paste you the code
Posted Image

#15

  • Location: usa
  • Minecraft: smokedogg

Posted 09 June 2011 - 11:32 AM

dis regard the previous post I got it working sp my worldgenminablehell the block.netherrack.blockID works but for smp it had to be block.bloodStone.blockID so i got it working in just a couple tries this tutorial worked awesome

a small gift for you :Diamond: :Diamond: :Diamond:
Posted Image

#16

  • Location: lava

Posted 13 June 2011 - 01:22 AM

I'm getting a strange error:

[21:20] java.lang.NullPointerException
[21:20] at net.minecraft.src.ModLoaderMp.a(ModLoaderMp.java:264)
[21:20] at net.minecraft.src.ModLoaderMp.HandleEntityTrackers(ModLoaderMp.java:1
30)
[21:20] at net.minecraft.src.EntityTracker.trackEntity(EntityTracker.java:102)
[21:20] at net.minecraft.src.WorldManager.obtainEntitySkin(WorldManager.java:31)

[21:20] at net.minecraft.src.World.obtainEntitySkin(World.java:894)
[21:20] at net.minecraft.src.WorldServer.obtainEntitySkin(WorldServer.java:82)
[21:20] at net.minecraft.src.World.func_464_a(World.java:2074)
[21:20] at net.minecraft.src.Chunk.onChunkLoad(Chunk.java:472)
[21:20] at net.minecraft.src.ChunkProviderServer.loadChunk(ChunkProviderServer.j
ava:70)
[21:20] at net.minecraft.server.MinecraftServer.initWorld(MinecraftServer.java:1
90)
[21:20] at net.minecraft.server.MinecraftServer.startServer(MinecraftServer.java
:128)
[21:20] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:251)
[21:20] at net.minecraft.src.ThreadServerApplication.run(ThreadServerApplication
.java:20)

The call to ModLoader.getMinecraftServerInstance is returning null. It looks like ModLoader.Init() is never being called, as that should set the server instance to something. Any idea what happened there?

Edit: wow I'm a moron, I forgot to install ModLoaderMp's MinecraftServer.class

Edit2: so this post isn't a complete waste of space..

View PostChampitoad, on 04 June 2011 - 04:16 PM, said:

I just have a question :

When I reobfuscate, MCP create a lot of .class in reobf/minecraft, and it obfuscate all the classes in reobf/minecraft_server :blink: , so I don't know exactly which .class take.

Is this normal ?

This happens if MCP can't rebuild on its first attempt, like what happens here due to the error in MinecraftServer.java that you have to correct. I have no idea how to rebuild its list of 'unmodified' classes.
Posted Image
INFORMATION WANTS TO BE WRONG

#17

Posted 14 June 2011 - 06:21 PM

To fix the above problem, run updatemd5.bat before you start modding. This then takes a "snapshot" of the source and when reobfuscating it compares the source to the snapshot, only outputting the changes you have made.
Posted Image

#18

Posted 14 June 2011 - 09:16 PM

Ok thanks jamioflan :)

#19

  • Location: lava

Posted 16 June 2011 - 04:16 AM

Could you give examples of playing sounds or interacting with vehicles (ie mounting entities)? From poking around I seem to be able to get everything else to work, but not those two.
Posted Image
INFORMATION WANTS TO BE WRONG

#20

  • Minecraft: FuzzyCat007

Posted 17 June 2011 - 11:06 PM

I have a problem:

== MCP v4.1 ==
[15:19] 148 recipes
[15:19] 16 achievements
[15:19] java.lang.RuntimeException: Error loading ModLoader config. Check the common problems section in the thread.
[15:19] at net.minecraft.src.ModLoader.init(ModLoader.java:583)
[15:19] at net.minecraft.src.ModLoader.Init(ModLoader.java:1260)
[15:19] at net.minecraft.server.MinecraftServer.startServer(MinecraftServer.java:72)
[15:19] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:255)
[15:19] at net.minecraft.src.ThreadServerApplication.run(ThreadServerApplication.java:20)
[15:19] Caused by: java.io.IOException: No such file or directory
[15:19] at java.io.UnixFileSystem.createFileExclusively(Native Method)
[15:19] at java.io.File.createNewFile(File.java:883)
[15:19] at net.minecraft.src.ModLoader.loadConfig(ModLoader.java:741)
[15:19] at net.minecraft.src.ModLoader.init(ModLoader.java:576)
[15:19] ... 4 more
[15:19] Jun 17, 2011 3:19:13 PM net.minecraft.src.ModLoader ThrowException
[15:19] SEVERE: Unexpected exception
[15:19] java.lang.RuntimeException: Error loading ModLoader config. Check the common problems section in the thread.
[15:19] at net.minecraft.src.ModLoader.init(ModLoader.java:583)
[15:19] at net.minecraft.src.ModLoader.Init(ModLoader.java:1260)
[15:19] at net.minecraft.server.MinecraftServer.startServer(MinecraftServer.java:72)
[15:19] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:255)
[15:19] at net.minecraft.src.ThreadServerApplication.run(ThreadServerApplication.java:20)
[15:19] Caused by: java.io.IOException: No such file or directory
[15:19] at java.io.UnixFileSystem.createFileExclusively(Native Method)
[15:19] at java.io.File.createNewFile(File.java:883)
[15:19] at net.minecraft.src.ModLoader.loadConfig(ModLoader.java:741)
[15:19] at net.minecraft.src.ModLoader.init(ModLoader.java:576)
[15:19] ... 4 more
[15:19] java.lang.RuntimeException: Exception occured in ModLoader
[15:19] at net.minecraft.src.ModLoader.ThrowException(ModLoader.java:1208)
[15:19] at net.minecraft.src.ModLoader.ThrowException(ModLoader.java:1213)
[15:19] at net.minecraft.src.ModLoader.init(ModLoader.java:583)
[15:19] at net.minecraft.src.ModLoader.Init(ModLoader.java:1260)
[15:19] at net.minecraft.server.MinecraftServer.startServer(MinecraftServer.java:72)
[15:19] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:255)
[15:19] at net.minecraft.src.ThreadServerApplication.run(ThreadServerApplication.java:20)
[15:19] Caused by: java.lang.RuntimeException: Error loading ModLoader config. Check the common problems section in the thread.
[15:19] ... 5 more
[15:19] Caused by: java.io.IOException: No such file or directory
[15:19] at java.io.UnixFileSystem.createFileExclusively(Native Method)
[15:19] at java.io.File.createNewFile(File.java:883)
[15:19] at net.minecraft.src.ModLoader.loadConfig(ModLoader.java:741)
[15:19] at net.minecraft.src.ModLoader.init(ModLoader.java:576)
[15:19] ... 4 more
[15:19] Jun 17, 2011 3:19:13 PM net.minecraft.src.ModLoader ThrowException
[15:19] SEVERE: Unexpected exception
[15:19] java.lang.RuntimeException: Exception occured in ModLoader
[15:19] at net.minecraft.src.ModLoader.ThrowException(ModLoader.java:1208)
[15:19] at net.minecraft.src.ModLoader.ThrowException(ModLoader.java:1213)
[15:19] at net.minecraft.src.ModLoader.init(ModLoader.java:583)
[15:19] at net.minecraft.src.ModLoader.Init(ModLoader.java:1260)
[15:19] at net.minecraft.server.MinecraftServer.startServer(MinecraftServer.java:72)
[15:19] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:255)
[15:19] at net.minecraft.src.ThreadServerApplication.run(ThreadServerApplication.java:20)
[15:19] Caused by: java.lang.RuntimeException: Error loading ModLoader config. Check the common problems section in the thread.
[15:19] ... 5 more
[15:19] Caused by: java.io.IOException: No such file or directory
[15:19] at java.io.UnixFileSystem.createFileExclusively(Native Method)
[15:19] at java.io.File.createNewFile(File.java:883)
[15:19] at net.minecraft.src.ModLoader.loadConfig(ModLoader.java:741)
[15:19] at net.minecraft.src.ModLoader.init(ModLoader.java:576)
[15:19] ... 4 more
[15:19] java.lang.RuntimeException: ModLoader has failed to initialize.
[15:19] at net.minecraft.src.ModLoader.ThrowException(ModLoader.java:1208)
[15:19] at net.minecraft.src.ModLoader.init(ModLoader.java:629)
[15:19] at net.minecraft.src.ModLoader.Init(ModLoader.java:1260)
[15:19] at net.minecraft.server.MinecraftServer.startServer(MinecraftServer.java:72)
[15:19] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:255)
[15:19] at net.minecraft.src.ThreadServerApplication.run(ThreadServerApplication.java:20)
[15:19] Caused by: java.lang.RuntimeException: Exception occured in ModLoader
[15:19] at net.minecraft.src.ModLoader.ThrowException(ModLoader.java:1208)
[15:19] at net.minecraft.src.ModLoader.ThrowException(ModLoader.java:1213)
[15:19] at net.minecraft.src.ModLoader.init(ModLoader.java:583)
[15:19] ... 4 more
[15:19] Caused by: java.lang.RuntimeException: Error loading ModLoader config. Check the common problems section in the thread.
[15:19] ... 5 more
[15:19] Caused by: java.io.IOException: No such file or directory
[15:19] at java.io.UnixFileSystem.createFileExclusively(Native Method)
[15:19] at java.io.File.createNewFile(File.java:883)
[15:19] at net.minecraft.src.ModLoader.loadConfig(ModLoader.java:741)
[15:19] at net.minecraft.src.ModLoader.init(ModLoader.java:576)
[15:19] ... 4 more
[15:19] 2011-06-17 15:19:13 [SEVERE] Unexpected exception
[15:19] java.lang.RuntimeException: ModLoader has failed to initialize.
[15:19] at net.minecraft.src.ModLoader.ThrowException(ModLoader.java:1208)
[15:19] at net.minecraft.src.ModLoader.init(ModLoader.java:629)
[15:19] at net.minecraft.src.ModLoader.Init(ModLoader.java:1260)
[15:19] at net.minecraft.server.MinecraftServer.startServer(MinecraftServer.java:72)
[15:19] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:255)
[15:19] at net.minecraft.src.ThreadServerApplication.run(ThreadServerApplication.java:20)
[15:19] Caused by: java.lang.RuntimeException: Exception occured in ModLoader
[15:19] at net.minecraft.src.ModLoader.ThrowException(ModLoader.java:1208)
[15:19] at net.minecraft.src.ModLoader.ThrowException(ModLoader.java:1213)
[15:19] at net.minecraft.src.ModLoader.init(ModLoader.java:583)
[15:19] ... 4 more
[15:19] Caused by: java.lang.RuntimeException: Error loading ModLoader config. Check the common problems section in the thread.
[15:19] ... 5 more
[15:19] Caused by: java.io.IOException: No such file or directory
[15:19] at java.io.UnixFileSystem.createFileExclusively(Native Method)
[15:19] at java.io.File.createNewFile(File.java:883)
[15:19] at net.minecraft.src.ModLoader.loadConfig(ModLoader.java:741)
[15:19] at net.minecraft.src.ModLoader.init(ModLoader.java:576)
[15:19] ... 4 more


My current solution is to say "what the hell" and post it up here
to see what happens (in other words, what Minecraftian angel
comes and tells me what the $@#%&!!! is wrong.)

I have decompiled a server jar and replaced the code snippet. It recompiles fine, but
when ran, gives the above error. Can someone help?

Pwease?


EDIT: FIXED, had a symbolic link in place of a .cfg file and had to mod ModLoader code a little
Posted Image