
UnionLib (Potions & Fluids)
Basic Information
This modification is not required for installation if you already have the main UnionLib mod. In cases where UnionLib is already present in your modpack, you can safely skip this component since all its functional capabilities are already integrated into the main library.
Functional Capabilities
This module represents a compact solution that activates special events for establishing correspondences between potions and liquids in the game. The main purpose of the mod is to simplify interaction between various modifications that use custom liquids for their potions, providing developers with a convenient mechanism for exchanging relevant information.
The modification adds two key events to the game:
- FluidToPotionEvent - determines which specific liquid corresponds to a particular potion
- PotionToFluidEvent - establishes which potion corresponds to a specific liquid
Impact on Vanilla Gameplay
From the perspective of gameplay, the changes introduced by this modification are practically unnoticeable to the average player. However, on a technical level, the mod uses the FluidToPotionEvent at the moment when the player collects water from a source using a glass bottle. This allows changing the type of potion obtained as a result of this action. Provided that the event results do not return null values, any liquid can be collected from the bottle. By default, a correspondence is established between the Water potion and the Water liquid.
Source Code
The source code for this module is not provided separately since all files are an integral part of the main UnionLib mod. The separation of this functionality into a separate modification was done for the convenience of developers using these capabilities, so they wouldn't have to depend on the main library.