Posted April 10, 20169 yr Hello all I decided it was time to update my mod from 1.8 to 1.9, and since it's pretty small that was not so hard. I just have an issue with the armor textures not loading, but that's for another time. My main problem is that the mod does not work on servers. In-game, it seems like the server doesn't load it, because all my items/blocks can be obtained through the creative tabs, but they are not usable. Meaning blocks that are placed disappear immediately, and blocks destroyed with, for example, my custom pickaxe just disappear visually, but I cannot walk through them after that, and a relog shows they are still there, while also all the mod-related items disappear from the hotbar. As I said, it worked perfectly on 1.8 servers, so there must be a change that I don't know about. The server console throws no error or even warnings. The weirdest thing is that if I start the server inside Eclipse, and then connect to it from outside eclipse, everything works. I presume it's hard to help with this little concrete information, so I liked my github; maybe someone has the kindness and time to take a look at my code. I will gladly provide any more details if needed. Thanks in advance https://github.com/Reygok/AdamantiumMod.git My first Mod: http://www.curse.com/mc-mods/minecraft/231302-adamantium-mod-better-than-diamonds#
April 10, 20169 yr I briefly skimmed through your code and couldn't see any obvious errors. I suggest you post the FML log from the server and client using Gist. I did notice a few things that could be improved: Instead of checking the event's side in your @EventHandler methods to do client-only things, use the @SidedProxy system. Instead of using the deprecated GameRegistry.registerItem method, use the new GameRegistry.register method. It's recommended that you use the single-argument overload of this method and set the registry name of the object you're registering (e.g. an Item ) with IForgeRegistryEntry#setRegistryName (or one of the overloads from IForgeRegistryEntry.Impl ) before registering it. Instead of registering models with ItemModelMesher#register in init, use ModelLoader.setCustomModelResourceLocation / setCustomMeshDefinition in preInit. The default model loaded for every Item is the one with its registry name ( IForgeRegistryEntry#getRegistryName ), so you should use this rather than creating your own name field and getName methods. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
April 11, 20169 yr You should really move the rendering stuff to a client proxy. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
April 11, 20169 yr Author I am so sorry for wasting your time... It did not work because I did not start the right .jar file. Since there are 2, and I'm usually playing with friends on a hosted server, where there is only one .jar file, I wasn't sure which one, and I never tried the other one. Now I did, and averything works fine. Thanks anyway for the code improvements, I'm in the process of doing that. And sorry again... My first Mod: http://www.curse.com/mc-mods/minecraft/231302-adamantium-mod-better-than-diamonds#
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.