Jump to content

Rendering pipes


Recommended Posts

I am currently writing a mod and I want to add a "heat pipe", simliar to Thermal Dynamics Ducts, Mekanism pipes, BuildCraft pipes or EnderIO conduits (see attachments).


From what I can tell is that there is a new BlockState system using json files since 1.13 or 1.12. As I'm using 1.14 I could take advantage of this system and define the pipes similar to how redstone wire is defined in the new assets folder.


Older forum posts I found 


suggest using a custom TileEntity or overwriting the Class rendering the block.


Which one would be the better suited for the newest version? I'm also thinking about the performance of either variant, if I'd take advantage of the new BlockState system there isn't anything additional going on in the Rendering Engine?


But that are just my thoughts, I'd be interested in hearing more ideas, what would be the best approach.


Thanks in advance ~





Link to comment
Share on other sites

I wouldn't say you'd need a custom TileEntity per se?

Have you reviewed the documentation on Models? https://mcforge.readthedocs.io/en/1.14.x/models/files/#model-files

Blockbench can help with making the models, though you'll still need to code them together yourself. IProperties could help you here -- for example you could have a bunch of BooleanProperty s in your block, one for each side of the pipe. If the "up" property is true (i.e. there is a pipe above this one), the BlockState json can detect that (if you define it) and change the model accordingly. I think these are called sub-models, but don't quote me on that.


Although it isn't quite what you're looking for, here is an example of a complex model and here is its blockstate. It only has one state, but I think it serves as a fine demonstration mostly ?

How to ask a good coding question: https://stackoverflow.com/help/how-to-ask

Give logs, code, desired effects, and actual effects. Be thorough or we can't help you. Don't post code without putting it in a code block (the <> button on the post - select "C-type Language"): syntax highlighting makes everything easier, and it keeps the post tidy.


My own mod, Magiks Most Evile: GitHub (https://github.com/GenElectrovise/MagiksMostEvile) Wiki (https://magiksmostevile.fandom.com/wiki/Magiks_Most_Evile_Wiki)

Edit your own signature at https://www.minecraftforge.net/forum/settings/signature/

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

  • Create New...

Important Information

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