Well, show your code that causes the error, or nobdy will be able to help you
Haha sorry I really just intended it to be a question! but here she is
So basically my issue is that my Entity when fed a dog biscuit it will tame it and trigger the naming GUI
once you hit okay in the GUI it forwards the name to the EntityDog and when the collar is put on it triggers SetCustomNameTag(as of line 461) but the server crashes when this is triggered... I know my code is may seem messy to some but I do my best
You'Re trying to set the name tag on the clientSide. As GUIs are ClientSIde only, you have to send a packet to the server to set the custom name that way.
You'Re trying to set the name tag on the clientSide. As GUIs are ClientSIde only, you have to send a packet to the server to set the custom name that way.
Networking in Minecraft/Forge is explained here. You should use the Simple Network Implementation for this.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Networking in Minecraft/Forge is explained here. You should use the Simple Network Implementation for this.
this is great! I understand but I don't know exactly how to register the name tag server side when the message is received?
Thanks so much again Choonster!
anyways I kind of get what I need to do but I'm not quite clear on how to do it. I have made my MessageHandler and message but how this would run a function for the server that it is on is what gets me.
I spent most of today trying to figure this out but I so far just don't understand.
Send a message to the server with the entity's ID and the new name. In your message handler (which is run on the destination side of the message, in this case the server), get the entity from the player's world by its ID (World#getEntityByID), check that it exists and the player is allowed to name it and then set its name.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Is there a different way for server side? or is it just something I am doing wrong? I'm still pretty sure it should be working! Thanks in advance!
- snubmansters.com
Well, show your code that causes the error, or nobdy will be able to help you
Haha sorry I really just intended it to be a question! but here she is
So basically my issue is that my Entity when fed a dog biscuit it will tame it and trigger the naming GUI
once you hit okay in the GUI it forwards the name to the EntityDog and when the collar is put on it triggers SetCustomNameTag(as of line 461) but the server crashes when this is triggered... I know my code is may seem messy to some but I do my best
EntityDog
http://pastebin.com/tZRep9em
GuiNameDog
http://pastebin.com/VFcuNSvk
Commands
http://pastebin.com/s1pBmRWU
- snubmansters.com
You'Re trying to set the name tag on the clientSide. As GUIs are ClientSIde only, you have to send a packet to the server to set the custom name that way.
Oh! so I was wrong. how would I possibly do this?
- snubmansters.com
Networking in Minecraft/Forge is explained here. You should use the Simple Network Implementation for this.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
this is great! I understand but I don't know exactly how to register the name tag server side when the message is received?
Thanks so much again Choonster!
- snubmansters.com
I guess there is no help for me here.
anyways I kind of get what I need to do but I'm not quite clear on how to do it. I have made my MessageHandler and message but how this would run a function for the server that it is on is what gets me.
I spent most of today trying to figure this out but I so far just don't understand.
Thanks again all
- snubmansters.com
Send a message to the server with the entity's ID and the new name. In your message handler (which is run on the destination side of the message, in this case the server), get the entity from the player's world by its ID (World#getEntityByID), check that it exists and the player is allowed to name it and then set its name.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.