Posted June 10, 201510 yr 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!
June 10, 201510 yr 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.
June 10, 201510 yr Author 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.
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.