Jump to content

Mod not working on server... Creative tabs issue


Yagoki
 Share

Recommended Posts

Just started a test server with a friend, put my mod on it and there's a problem with the blocks and items, namely they aren't recognized by the server. Trying to pull them from the creative tabs caused the player to be booted (with this error showing on the server), Trying the "/give" command returned "no such item".

 

I'm assuming that this is because they haven't been created on the server, or something, soooo... Help plz (all code on github, link in signature, if you need directing to any specific classes which you can't find, just ask)

 

Thanks in advance.

Link to comment
Share on other sites

The most common cause of that issue would be id mismatch between client/server, or the mod not being present on the server.

 

the source points to

ItemStack.java:

public int getItemDamage()

    {

        return this.getItem().getItemDamageFromStack(this);

    }

 

as being the cause of the issue.  (likely caused by a null Item reference in the ItemStack)

 

In a few recent Forge releases there were some issues with calling getItemDamage() causing NPE when called with certain items (i don't remember the exact circumstances though...) -- so if neither of the first problems is your issue, you might try updating the Forge/FML on both your client(s) and server.

Link to comment
Share on other sites

On another note, error appears to be a packet handling issue, which is strange because you have a packet handler....but its strange cuz i can't find a regular block id for what is in your creative tab....

I took over Hunting Traps Mod and work on helping the forge community as much as I can. View my work here: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/1443756-1-7-2-1-6-4-1-5-2-1-4-7-hunting-traps-mod-v-0-4-0

Link to comment
Share on other sites

Yeah, I thought it was a server client disparity, wasn't too sure. As for forge we were using the latest available version. I will double check that my friend installed it properly on the server, but still a bit confused by it.

 

I think the packet handling is vanilla, not something I've caused (as far as I can tell). I think it was because the server can't find a block/item at that ID to send to the client (client requests it from inventory then server sends as packet)

 

Still not sure what caused it but I will bug him when he's next online  :-\

Link to comment
Share on other sites

hard code a default id into your mod then make the config read the hard code.

 

unless someone has changed their ids that might fix your error. it all depends on the root of your issue that is not evident on the crash log.

I took over Hunting Traps Mod and work on helping the forge community as much as I can. View my work here: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/1443756-1-7-2-1-6-4-1-5-2-1-4-7-hunting-traps-mod-v-0-4-0

Link to comment
Share on other sites

no apparently the server config is identical :/

 

also it's beyond the point where i can tweak things in that release without removing loads of code, so I think i'll just leave it for now. Thanks anyway.

 

Also there are hard coded id's (the default ids increment from 700)

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
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.

 Share



×
×
  • Create New...

Important Information

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