Jump to content

Recommended Posts

Posted

I have been trying to run my Mod on a server but I am running into some issues. Basically, almost nothing works. The other mods that I have installed work, and my mod works on single player, but nothing generates with my mod and when I try to use the items they disappear when I right click with them. Strangely enough the custom armor works fine, but that is about it. I do not get any errors either. Can anyone help me with this?

 

Main:

 

  Reveal hidden contents

 

 

ClientProxy:

 

  Reveal hidden contents

 

 

CommonProxy:

 

  Reveal hidden contents

 

Posted

What version of forge/minecraft are you using? In later versions (somewhere around minecraft 1.5.2 I think) @Init was replaced by @EventHandler. Also, I think classes are placed in preinit and not load.

Posted

Just because a mod works in single player doesn't necessarily mean that it will work properly in multiplayer; for example, I had a reference to the mine craft instance in the start of my own mod that I had to remove.

 

It sounds like you are having issues with your mod after it is placed in actual minecraft but the issues are in the coding; it may help you to run the server from your development environment. By that, I mean that the way you tested your mod (hitting the green run button at the top if you have eclipse) can be applied to the server as well; if you click a little arrow on the side you can run the minecraft server program from eclipse. If it doesn't crash right away, you can then start up the minecraft single player version and connect to your eclipse server.

 

And again, I'm reasonably sure that @Init needs to be @EventHandler and your constructors should be in a preInit method. This is copied from Havvy's forge tutorials, which I recommend you check out; the methods and syntax are reasonably up-to-date (sorry for copy pasting but I either don't know how to hide code or it's not working in my browser for some reason).

 

@Mod(modid="generic", name="Generic", version="0.0.0")

@NetworkMod(clientSideRequired=true, serverSideRequired=false)

public class Generic {

       

       

        @Instance(value="generic")

        public static Generic instance;

 

        private static Item genericItem;

        public static Item genericIngot;

 

        @SidedProxy(clientSide="tutorial.generic.client.ClientProxy",

                        serverSide="tutorial.generic.CommonProxy")

        public static CommonProxy proxy;

       

        @EventHandler

        public void preInit(FMLPreInitializationEvent event) {

                genericItem = new GenericItem(5000);

                genericIngot = new GenericItem(5001)

                .setMaxStackSize(16).setUnlocalizedName("genericIngot");

        }

       

        @EventHandler

        public void load(FMLInitializationEvent event) {

                LanguageRegistry.addName(genericItem, "Generic Item");

                LanguageRegistry.addName(genericIngot, "Generic Ingot");

        }

       

        @EventHandler

        public void postInit(FMLPostInitializationEvent event) {

                // Stub Method

        }

}

Posted

import net.minecraft.client.model.ModelIronGolem;

Update your imports. Check you don't reference client-side only classes in common classes.

Start blocks and items in PreInit phase. Register your items with GameRegistry.

Read tutorials for registering entities properly, and localizing things.

Posted

Nevermind. It worked on the MCP server but once I tried it on the regular server it still doesn't work. I noticed that when I try reobfuscating the files, it tells me the server source is messed up and to run updatemd5. When I try running updatemd5 it just tells me to fix the server source first. Any help in fixing this? I haven't messed with any vanilla files, and it even gives me this error when I run a fresh MCP install.

Posted

The server source error should be normal; I think it always spits that error out. Other than that, I guess just troubleshoot. Make sure that the version of forge your mod is created in is the same version on your server. I would also recommend having no other mods on that server just in case there's a conflict and that's the cause of the issue.

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.