fabric
fabric copied to clipboard
Fluid API v1
This module adds a new FabricFlowableFluid class and FabricFluidBlock class. The new fluid class lets the user register one fluid instead of both a still fluid and a flowing fluid the vanilla way. It also lets the user set the maximum level of the fluid via an abstract method. Both classes provide some optimizations over vanilla's counterpart classes and contain some new methods that can be overriden for more control.
~~i have [some serious] concerns~~
- ~~where is fluid volume api~~
- ~~does it use millibuckets or millitoffets?~~
nevermind
Imo, this module should just be called fabric-fluid-api-v1
so other future stuff like adding more tags for fluid behavior (such as for swimming, drowning, etc.) can be included in a more general fluid module, much like we have for items (fabric-item-api-v1
).
A fluid volume api would be fabric-fluid-volume-api-v1
I have renamed the module as per Prospector's suggestion.
I am unsure about this PR because my original goal with it was to essentially replace vanilla's fluid system (which IMO isn't very good), and this PR accomplishes this quite well. I am now realizing though, that forcing users to use a single fluid and the custom fluid block class takes away control, and that this PR might not wholly fit into Fabric API. In the Discord API channel, it was discussed that a unified fluid class does not fit into Fabric API and that the FluidBlock class should be mixed into instead of replaced, but I am really not sure how to improve the system only partially.