Jump to content

[1.8][SOLVED] Get source block from flowing liquid


Chapi

Recommended Posts

Hello,

 

I have a tileEntity which detects when a flowing liquid (non source block) is on top of it, and what I need this entity to do, is find the source block that is generating that  flowing liquid and delete it. Is this possible and how would it be done? Thanks!

Link to comment
Share on other sites

Not directly possible. One liquid flow can have many sources. So solution is rather removing all sources.

 

You need to perform block search starting from TileEntity moving recursively in all directions until hitting source block.

Keep in mind that water can be falling from very high places so the search in BAD conditions can take quite big chunk of processing power (in comprasion).

 

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

Not directly possible. One liquid flow can have many sources. So solution is rather removing all sources.

 

You need to perform block search starting from TileEntity moving recursively in all directions until hitting source block.

Keep in mind that water can be falling from very high places so the search in BAD conditions can take quite big chunk of processing power (in comprasion).

 

Thanks for the reply, was hoping that minecraft had for some reason info on which source blocks are contributing to the flowing block but guess not, found a adjacentSourceBlocks int inside the BlockDynamicLiquid but it's private and no way to modify it from outside the class and it probably doesn't serve any actual effect if changed. Was afraid I'd have to do an actual manual search but guess I'll just have to figure out a decent algorithm to do this, thanks again.

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.