Jump to content

Multi-Block Structures


Recommended Posts

Hello Guys!


I have asked all around the modding community, looked through countless old posts, searched through pastebin, github and other various bits of source code but I still have not found a efficient, and understandable way to do this (for a noob, at least)!


From what I have gathered, the BlockChest.class file checks to see if the block placed next to it is equal to the chest, then it does unifyAdjacentChests(). That part makes sense to me, but I do not see how I could apply this to my multi-block.


Next, I found this link.



Either I do not understand it fully, or it is irrelevant to multi-blocks. My guess is that my knowledge is not extensive enough to understand it, even with all the comments.


From another individual that wanted to know how to construct a multiblock, I found this forum.



From Jdb100's post, I got that if the blocks to the x, y, and z coords of the block are the same, then it replaces it with the multiblock. However, won't this just give every block placed it's own TileEntity? I would like one single GUI for the entire structure. I am looking for something more like gcewing's post. This is the most information I could get out of it, and the other suggestions just hurt my mind to look at it.


From these sources, especially the one from minecraftforge.net, I have gotten the gist of the multiblock, but I have more questions/requests.


1. can someone noobify it down for me?


2. If this doesnt work, would it be possible to place a single block, then have a setBlock function set the other blocks down for me and basically assemble the structure?


3. How would I be able to make a texture for my multi block, and have it run as one gui in a 3x4x3 structure?


4. Can someone supply me with the railcraft source code for coke ovens? At least the specific tid-bit that would help me better understand this.


I hope someone is willing to help me with this, as I know from my searches that this is a highly sought after topic.


Thanks and best regards!

Link to comment
Share on other sites

I made a multiblock structure in my mod. here's my file. basically look at the methods from isMultiBlock to onActivated. and when you check the coordinates in isMultiBlock, it's relative to the center block, and in onActivated, it's the same thing, just invert the + and - signs.


Link to comment
Share on other sites

Well my code makes no sense because I haven't quite figured it out myself.  I've been focusing the last couple of days on getting a release ready and all the needed information for that set up.  The comments are me thinking about how I want to proceed, and I find it easier to figure things out if I act like I'm teaching.


What I have so far is I'm going for a multiblock system that is a bit closer to XYCraft then Railcraft, since I find some of the limitations of the Railcraft multiblocks irritating, mainly not being able to have them touch.  Thinking this through I'm going to go for figuring the multiblock out through it's internal geometry, since I know each machine is a specific shape and key blocks have to follow certain rules.  For your typical fixed size multiblock it's probably a bit too involved.  I'll be working on this more in the next day or so.

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.