GM4_Datapacks icon indicating copy to clipboard operation
GM4_Datapacks copied to clipboard

Modernize (and Boltify) Liquid Tanks

Open SpecialBuilder32 opened this issue 1 year ago • 10 comments

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:

  • [x] ~~Remove reference to autocrafters for unstackables~~
  • [ ] Update/add new PackTests
  • [x] Add (or not) omnious bottles to either Potion Liquids or Standard Liquids
  • [x] Triple check all these changes in-game (I've solely been believing Packtest that this passes existing tests)
  • [x] Add docs

SpecialBuilder32 avatar Sep 06 '24 17:09 SpecialBuilder32

This PR has a lot of merge conflicts by now and is very old. It's at high risk of becoming irrelevant with the speed Minecraft versions are moving at.

@SpecialBuilder32 what are your plans for this?

Bloo-dev avatar Jul 07 '25 20:07 Bloo-dev

I think this PR still has merit, it should help with maintaining update speed in the future for new liquids.

I am on a work trip this week, and so will attempt to rebase this PR and see how much work it would take to speed up to modernity.

SpecialBuilder32 avatar Jul 07 '25 22:07 SpecialBuilder32

Any updates? @SpecialBuilder32

Bloo-dev avatar Jul 28 '25 20:07 Bloo-dev

Alright I got through the rebase, but forgot the option to preserve GitHub timestamps. I'm not going through that again so it'll just be a tad messy in this PR.

Next is making it run again...

SpecialBuilder32 avatar Jul 30 '25 05:07 SpecialBuilder32

almost approaching 1 year anniversary on this pr :tada:

I'll maybe do a review again when this gets closer. I've been experimenting with bolt-forward api design lately here so I've found what I've liked and disliked so far.

rx-dev avatar Aug 25 '25 00:08 rx-dev

almost approaching 1 year anniversary on this pr :tada:

I'll maybe do a review again when this gets closer. I've been experimenting with bolt-forward api design lately here so I've found what I've liked and disliked so far.

I'm most of the way through reviving this PR to be merged soon. I've got it updated to 1.21.8 now and just need to finalize a few things.

SpecialBuilder32 avatar Aug 25 '25 01:08 SpecialBuilder32

This PR could also be a good time to add support for Bundles in washing tanks, as I think they've been forgotten

runcows avatar Oct 09 '25 01:10 runcows

Alrighty I've finished the last thing on my list for Liquid Tanks, and I'm happy with it.

@misode I've resolved all the lingering review comments you left (checks notes, 8 months ago...). Can you take another peek and/or re-review?

SpecialBuilder32 avatar Oct 17 '25 19:10 SpecialBuilder32

@SpecialBuilder32, you have become the very thing you swore to destroy.

Bloo-dev avatar Nov 09 '25 08:11 Bloo-dev

This is being server tested right now. We're hoping to catch the bugs that way and merge this rather soon.

Bloo-dev avatar Nov 25 '25 21:11 Bloo-dev