Flenix Posted June 25, 2013 Share Posted June 25, 2013 Hey guys, I want to make a few of my own signs (kind of similar to the vanilla signs) The main difference will be shape, and the position/amount of lines or characters that can be written. I tried copying the vanilla sign block + entity classes to experiment, but eclipse wasn't very happy about that (It kept telling me I had to create a constructor, then I'd create it and it'd tell me it was wrong...) Can anyone point me in the right direction? Quote http://s13.postimg.org/z9mlly2av/siglogo.png[/img] My mods (Links coming soon) Cities | Roads | Remula | SilvaniaMod | MoreStats Link to comment Share on other sites More sharing options...
ObsequiousNewt Posted June 26, 2013 Share Posted June 26, 2013 "it'd tell me it was wrong"? How so? Quote BEWARE OF GOD --- Co-author of Pentachoron Labs' SBFP Tech. Link to comment Share on other sites More sharing options...
Flenix Posted June 26, 2013 Author Share Posted June 26, 2013 "it'd tell me it was wrong"? How so? Well, it'd ask me to create a constructor. I'd click the link to auto-make it, and get this: public TileEntityRoadSignBlock(int roadSignID, Class par2Class, boolean par3) { //Todo: Auto Generated Stub } So, obviously I needed to add a few things, so I added: super(roadSignID, Material.iron); this.isFreestanding = par3; and also private Class signEntityClass; (All of which are directly from the Sign's block class) Then it accepts that as no errors, but back in my main block class it simply tells me I need a constructor again and would auto-create that same thing, going around in circles. I'm not quite sure what I did, but I seem to have fixed it again now. However, when I try and place the sign in-game I get "Unable to locate sign at [coords]" You seem to know literally everything about Forge.. any idea what I'm missing? I've registered the tile entity so I'm not sure what else there is. Maybe the sign has another class that I've not found yet? Quote http://s13.postimg.org/z9mlly2av/siglogo.png[/img] My mods (Links coming soon) Cities | Roads | Remula | SilvaniaMod | MoreStats Link to comment Share on other sites More sharing options...
ObsequiousNewt Posted June 26, 2013 Share Posted June 26, 2013 "it'd tell me it was wrong"? How so? Well, it'd ask me to create a constructor. I'd click the link to auto-make it, and get this: public TileEntityRoadSignBlock(int roadSignID, Class par2Class, boolean par3) { //Todo: Auto Generated Stub } So, obviously I needed to add a few things, so I added: super(roadSignID, Material.iron); this.isFreestanding = par3; and also private Class signEntityClass; (All of which are directly from the Sign's block class) Then it accepts that as no errors, but back in my main block class it simply tells me I need a constructor again and would auto-create that same thing, going around in circles. I'm not quite sure what I did, but I seem to have fixed it again now. However, when I try and place the sign in-game I get "Unable to locate sign at [coords]" You seem to know literally everything about Forge.. any idea what I'm missing? I've registered the tile entity so I'm not sure what else there is. Maybe the sign has another class that I've not found yet? That would seem more like a Java problem or an Eclipse problem. Did you copy TESign or extend TESign? Because I just did both, and I didn't get any errors for either. Besides, TESign doesn't have a constructor (oddly enough, it gets intialized by reflection), and the constructor you wrote matched instead BlockSign. When I copy BlockSign, it works (no compile errors anyway), and when I extend it, it asks for the constructor, which I give to it, matching your code, and Eclipse is satisfied. Quote BEWARE OF GOD --- Co-author of Pentachoron Labs' SBFP Tech. Link to comment Share on other sites More sharing options...
Recommended Posts
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.