Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

 

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

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

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

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.