fabric icon indicating copy to clipboard operation
fabric copied to clipboard

Fluid API v1

Open PepperCode1 opened this issue 3 years ago • 4 comments

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.

PepperCode1 avatar Oct 23 '20 04:10 PepperCode1

~~i have [some serious] concerns~~

  1. ~~where is fluid volume api~~
  2. ~~does it use millibuckets or millitoffets?~~

nevermind

sylv256 avatar Oct 29 '20 21:10 sylv256

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

Prospector avatar Nov 12 '20 03:11 Prospector

I have renamed the module as per Prospector's suggestion.

PepperCode1 avatar Nov 25 '20 06:11 PepperCode1

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.

PepperCode1 avatar Mar 31 '21 02:03 PepperCode1