Option to skip replacing fluid states in MixinTemplate
embeddedt opened this issue ยท 4 comments
Is your feature request related to a problem? Please describe.
I'm working on a backport of shipwrecks by loading in 1.18.1 structure files and dynamically rewriting the block names and properteis to 1.12 equivalents. This is working quite well, with one minor issue: the blocks are completely replacing the water that was there before. I believe this may be due to this line of MixinTemplate
?
Describe the solution you'd like
Perhaps there can be an internal option to disable replacement of FluidStates for a certain Template. I'll be requiring Fluidlogged API to be installed to enable this feature anyways, so having to cast the template to an interface would be fine.
Describe alternatives you've considered
The only other solution I can think of is to implement my own subclass of Template that sets the blocks myself.
The only other solution I can think of is to implement my own subclass of Template that sets the blocks myself
You could always waterlog the blocks prior to saving the structure.
Perhaps there can be an internal option to disable replacement of FluidStates for a certain Template
I was originally going to add support for an optional "keepOldFluidStates" tag, but since it was only accessible via programs like NBTExplorer, I decided not to. Thinking about this again, and I think I'll add it, so people can do things like reuse structures for different bodies of fluids, and for people would rather use the tag than edit tons of structures in-game & fluidlog stuff.
I was originally going to add support for an optional "keepOldFluidStates" tag
That will work great for my purposes. I can't easily waterlog the blocks prior to saving the structure because it's an unmodified 1.18 structure file that I convert at runtime. Also, some parts of the ship could float above the water, so I don't want it to be unconditionally waterlogged, either. Adding a tag, however, is 100% feasible.
The fix worked perfectly! One other issue I discovered (I hope you don't mind the flood of reports recently!) is that upside-down stair blocks are still rendering with water on top of them. From what you've said about fluids flowing out of sides, it sounds like this is expected behavior, but I don't think vanilla does this and it looks a bit ugly.