Posted May 19, 20205 yr 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 ~
May 19, 20205 yr 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/
May 19, 20205 yr Look into multipart blockstate json files on the minecraft wiki, they do (almost) everything forge blockstates used to do (forge blockstates no longer exist).
May 19, 20205 yr Howdy multipart blockstates are probably your best bet. Here's a working example of something very similar (a 3D web which joins itself to adjacent solid blocks) https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe03_block_variants -TGG
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.