Jump to content

[1.15.2] Multiblock structure approaches


SSilvamc

Recommended Posts

I'm trying to come up with a way to create multiblock structures where a controller block will be notified when any of the slave blocks in the structure is broken. Is it possible to do this using vanilla blocks as slaves? I've read a bit of the Tinkers' Construct approach to multiblocks, but part of its method uses TileEntities for every slave block. This means that it wouldn't be possible to use blocks without tile entities in the structure using this approach (for instance, using wooden planks as part of the building).

 

To be more precise in what I'm looking for, I'm trying to transform buildings into multiblock structures. Inside the building there must be a controller block. Whenever any of the blocks of the structure is broken, the structure will lose health (which I guess would be stored in the TileEntity) and the broken block will come back to its place. When the structure's health reaches zero, it will be removed.

 

What are some other approaches to multiblock structures that could work? What other mods use multiblock structures? Do any use vanilla blocks as slaves?

Thanks

 

Link to comment
Share on other sites

Just now, CHEESEBOT314 said:

I would suggest looking into the Patchouli by Vazkii which provides a multiblock solution you are looking for.

Doesn't seem to be what I'm looking for. Though this allows vanilla multiblocks and visualization, it doesn't include a master-slave relation between blocks.

Link to comment
Share on other sites

Howdy

I think it would be possible to do this using one of the BlockEvents, eg NeighborNotifyEvent or BreakEvent.

 

i.e. you subscribe to BreakEvent; when any block is broken, your code checks to see if it was within a multiblock structure (eg - look for controller tile entities within a given radius).  If so, the controller  "check your structure components, they have been changed".

 

-TGG

Link to comment
Share on other sites

Just now, TheGreyGhost said:

Howdy

I think it would be possible to do this using one of the BlockEvents, eg NeighborNotifyEvent or BreakEvent.

 

i.e. you subscribe to BreakEvent; when any block is broken, your code checks to see if it was within a multiblock structure (eg - look for controller tile entities within a given radius).  If so, the controller  "check your structure components, they have been changed".

 

-TGG

That's great! I'll try it out.  

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
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.

Announcements



×
×
  • Create New...

Important Information

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