Installation : Client 1.7.3

Requires Risugami’s ModLoader
Simply drag and drop the files into minecraft.jar
Delete META-INF, even though you already did with ModLoader

Download Link:

http://www.mediafire.com/?2uqar1c44reka0w

 

Guide:

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

Go to sources/minecraft_server/net/minecraft/server
Open MinecraftServer.java
Delete lines 334 ~ 370
(They look like this)

           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;
    }

Add this in their place

                        finally
                        {
                                try
                                {
                                        stopServer();
                                        serverStopped = true;
                                }
                                catch(Throwable throwable2)
                                {
                                        throwable2.printStackTrace();
                                }
                                finally
                                {
                                        System.exit(0);
                                }
                        }
                }
        }

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 (MCPsrcminecraftnetminecraftsrc)
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 MCPsrcminecraft_servernetminecraftsrc 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. You can find available IDs in this spreadsheet (column B : “Entity IDs”)
https://spreadsheets…bUE&hl=en#gid=0

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

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). Go to this spreadsheet and choose a free ID in the “VehicleSpawn IDs” column. Don’t forget to fill in the box with your Entity to avoid conflicts.
https://spreadsheets…bUE&hl=en#gid=0

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. Open this spreadsheet and choose a free ID in the “Net GUIs” column, making sure to fill it in with your GUI name.
https://spreadsheets…bUE&hl=en#gid=0

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

One last thing 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.