Fluid Procedures

Published by DKMK100 on Fri, 06/12/2020 - 17:47
Upvotes: 3
Issue description

We need a few more procedures to use fluid blocks:

  • Is block at x y z a fluid block
  • Is block at x y z a fluid source block
  • Convert block to fluid bucket or air if conversion fails
  • Convert fluid bucket to block or air if conversion fails

And when blocks can store fluids ( second most upvoted issue!) then also add:

  • Convert fluid to block or air if conversion fails
  • Convert block to fluid or null if conversion fails

Issue comments

Make sure to post only one feature request or bug report in each ticket, so each separate item can be tracked by our issue tracking system. Issues with multiple requests will be removed. The tracker is not a place for large lists of feature requests. Such lists belong to Feature requests and ideas for MCreator forum section and we will pick the most requested features from there. For questions related to the usage of MCreator, open a forum topic instead. This tracker is not a place for programming support neither.
 

You can make a plugin for all these if it is urgent.

Some of them are planned, too, last two will come with tanks.

Checking for the fluid block can be done with normal block checks.

And I mean a check for “is block a fluid source block” would be true for any fluid source block (water, lava, and modded). The most common use for these procedures would be:

 

If( is (get block at x y x) a fluid source block){

Place air at x y z

set 1 (convert fluid at x y z to bucket) in slot 0 of gui

}

I will check what can be done.

set 1 (convert fluid at x y z to bucket) in slot 0 of gui

I am not sure a public API to do this exists

While these are different procedures, they have similar implementation and serve the same purpose. I made them in the same ticket for the same reason that RF and fluid storage are the same ticket. Please reopen the issue as these are necessary and I don't know how to implement them. And no, the fluid block check cannot be don with normal block checks. I am not checking for a specific fluid, I am checking if it is a fluid. I want it to work with modded fluids too!!! 

 

Please reopen the issue!!

Can't you check what bucket is connected to a fluid from a mod? If the block is not a fluid or the mod didn't connect a fluid bucket than you just return air but I thought that the fluid bucket is based off of the fluid? I could be wrong on that but the other procedures are definitely possible. A check to see if a block is a fluid is definitely possible and checking if that block is the source block should also be possible.



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.