Gamemode4Dev / GM4_Datapacks

Gamemode 4 is a collection of modular Minecraft Datapacks that change or expand on the vanilla experience whilst keeping the vanilla feel. Our modules are developed with a focus on usability and efficiency.
https://gm4.co
GNU General Public License v3.0
115 stars 57 forks source link

Modernize (and Boltify) Liquid Tanks #1036

Open SpecialBuilder32 opened 2 months ago

SpecialBuilder32 commented 2 months ago

This PR updates some of the liquid tanks backend to use the more efficient (or at least simpler) execute if items added by 1.20.4, and modernizes to display entities and computation improvements. XP tanks now hold 4x the liquid (50 levels) and have a quick deposit/withdraw interface similar to XP storage. Potion liquids has been updated with the newest potion types, and now supports awkward, thick, and mundane potions. Kyrius's polished liquid skin textures give the tanks a fresh coat of paint.

This PR also adds a somewhat experimental (as in we may not use this approach in other modules, not as in the code is unstable) set of bolt bindings/wrappers for creating and defining new liquids for a liquid tank. This approach uses a decorator-based design scheme to add mcfunction lines to places where different liquids might have different commands, but is somewhat more complex as a result of that. It does have the benefit of reducing repetition throughout the liquid-tanks codebase however, and makes future maintaining hopefully much faster. I hope this style of bolt usage at least sparks a discussion about what might best serve other modules.

Potion liquids is now (nearly) fully automatically built from a file listing all the vanilla potions and their effects. This makes adding new effects much simpler going forward. Additionally, any new potions that do not have an explicitly added skin texture available will auto-generate their skin texture to match the potion's particle color, though an artists manual touch is preferred in the long run.

Remaining TODOs: