Finish adding FluidState API#9951
Conversation
Sytm
left a comment
There was a problem hiding this comment.
Also where did the methods on the BlockState go that the original PR had?
Owen said on Discord that we probably shouldn't couple liquid with blocks. That's the main reason for the fact it's not there. I could still add it tho. If do add it, should I make it a new patch or edit the existing one? |
If Owen said that you can leave it like it currently is, he is more knowledgeable around this stuff after all. |
Owen1212055
left a comment
There was a problem hiding this comment.
In general I think this api is very helpful, but I think we need to move a bit in a different direction here. More specifically, you're sort of mashing the BlockData concept of being "wordless" and BlockStates "world" idea.
Since you're introducing methods that require a world, but also some that don't.
So should I do methods that require a world or not? I would say they don't require a world since you get the FluidData from the World. |
|
(Continuing on my previous comment) |
76a75be to
e1874f4
Compare
This commit adds a new FluidState API to the system. It introduces various methods to get information from fluid states in the game, such as checking if a block is a fluid source, getting the amount of fluid, type of the fluid (water or lava), and its flow direction. It helps to enhance flexibility when managing fluid dynamics in the game. Alongside new API, it also modifies the existing `RegionAccessor` class to incorporate the functionalities of the FluidState API.
oh god I hope I did this right
4aac579 to
987e01a
Compare
* Add new FluidState API functionality --------- Co-authored-by: Bjarne Koll <lynxplay101@gmail.com> Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
* Add new FluidState API functionality --------- Co-authored-by: Bjarne Koll <git@lynxplay.dev> Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
This pull request adds the FluidState API started by MachineMaker in PR #8609.
It adds everything in the PR's todo list. I tested the methods and they returned everything correctly. I don't really know what more I could say. Feel free to ask any questions!