Jump to content

How can I create a custom sign?


Flenix
 Share

Recommended Posts

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?

width=463 height=200

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

"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? :P 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?

width=463 height=200

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

"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? :P 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.

BEWARE OF GOD

---

Co-author of Pentachoron Labs' SBFP Tech.

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I'm researching the how to create biomes in json. There is a great tool for creating the jsons online. Using the vanilla `river` biome, I want to essentially create a custom disk feature that mixes 3 blocks instead of a single-block provider. Any ideas on where to start with that?
    • I figured out what was wrong ... you can spot it pretty quick most likely: { "type": "minecraft:smelting", "ingredient": { "item": "minecraft:gold_nugget_ore" }, "result": "minecraft:gold_nugget", "experience": 0.25, "cookingtime": 150 }   ... so, after changing `minecraft` to `foundations` for all the custom items and all the recipes work. Well that's what copy/paste will get you. One last question about recipes, though. What does the following json key/value do in the game? "group": "copper_ingot"  
    • # Copyright (c) 1993-2009 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # #      102.54.94.97     rhino.acme.com          # source server #       38.25.63.10     x.acme.com              # x client host # localhost name resolution is handled within DNS itself. #    127.0.0.1       localhost #    ::1             localhost ###0.0.0.0 apps.corel.com ###0.0.0.0 mc.corel.com 0.0.0.0 origin-mc.corel.com ###0.0.0.0 iws.corel.com
    • Is there a way to create a custom map marker for a custom structure/biome (same as a vanilla mansion)?
    • I’ve scrounged the Internet for solutions and found absolutely nothing that has worked for me I have posted my code in a GitHub Repository. I bet the culprit is somewhere in the Container or TileEntity classes (Furnace packages are in blocks/coke_furnace or blocks/foundry) PS I know I’m on 1.12.2 and that it’s not supported I don’t want to update my game or my code. Lol It’s my favorite version and the most widely modded. I don’t plan to release the mod, I’m just customizing my game to my will. I’ll send it to friends but that’s it.
  • Topics

×
×
  • Create New...

Important Information

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