- Change static lookup map to an instance variable
- Add an instance variable for the "empty pot" for the current block
- Keep one instance of the lookup map between the empty pot and all its full versions
- Convert everything to use delegates
* Some (sadly breaking) improvements to the API, after feedback and concerns provided by users:
- Moved calculation of the translation key to the FluidAttributes constructor, so that builders can be shared between still & flowing sub-fluids.
- Moved biome-based coloring to a dedicated FluidAttributes.Water variant, which is not used by default.
- Added logic to automatically gather fluid textures into the list of textures to bake.
- Patched BucketItem and FlowingFluidBlock to avoid eager access to the fluid objects.
- Added a ForgeFlowingFluid class, as a more user-friendly way to construct a new FlowingFluid.
there's a race condition - and the extra work forge does causes it to
happen much more frequently than vanilla (though I'm sure it's a vanilla
issue). Closes#6124, #5767 and probably lots more.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
* Fix nulls returning from non-null methods, and null-check of non-nullable values.
* Fix missed computation of the isEmpty flag in FluidStack
* Cleanup getAmount/isEmpty calls.
* Remove redundant suppliers. That info is readily available from the vanilla Fluid / FluidState.
- Moved forge fluids into FluidAttributes companion object to the vanilla Fluid. By gigaherz
- Redesigned the Fluid API to be closer to the Items API. By King Lemming
Co-authored-by: King Lemming <kinglemming@gmail.com>
Add early error for setting invalid world directory. Closes#6084
Fix PlayerTickEvent not firing when dead, even if player isn't removed from world yet. Closes#6074
Fix PlayerDestroyItemEvent not firing for some cases. Closes#6067
Fixed trees able to be generated through water. Closes#6000
Change Block#toString to use getRegistryName instead of getNameForObject Closes#5937
Allow Cooking Recipes to deserialize results with stack sizes. Closes#5960