Tschipcraft / make_bubbles_pop

Client-side mod that makes bubble particles pop and lets them rise realistically to the water surface.
https://tschipcraft.ddns.net/make_bubbles_pop.html
Other
12 stars 3 forks source link

Nitpick: Literal newline in `fabric.mod.json` of 0.2.0 artifact #12

Closed YoshiRulz closed 5 months ago

YoshiRulz commented 5 months ago

This doesn't seem to be a problem for the Fabric loader, but a strict parser like jq's will choke on literal newlines in strings. Since it's not literal in the source: https://github.com/Tschipcraft/make_bubbles_pop/blob/f23c11c4fcf519320bebc35fc4d2538122b73361/fabric/src/main/resources/fabric.mod.json#L6 ...I'm guessing the process of expanding templates is what introduces it.

Tschipcraft commented 5 months ago

Interesting, I did not know that happens. I'm pretty much just using the default build config from fabric's example mod, so I'm not sure how I could fix this permanently (sure I could just overwrite the fabric.mod.json when it's built, but I kinda don't want to do that every time). If you have any suggestions (except removing the newline lol), feel free to let me know

YoshiRulz commented 5 months ago

I found 2 mods which don't have the same problem, and they both have this in their build scripts:

expand(stringProperties) {
    escapeBackslash = true
}
Tschipcraft commented 5 months ago

Thank you for the observation, I will try this out

Tschipcraft commented 5 months ago

The extra line fixed this issue. All builds moving forwards will not have literal new lines in their fabric.mod.json 🎉

YoshiRulz commented 5 months ago

Thank you! I'll try and get that fixed in the Fabric mod template too.