OreCruncher / DynamicSurroundingsFabric

Dynamic Surroundings mod for Minecraft
MIT License
63 stars 25 forks source link

Properly escaping unicode in fabric.mod.json #24

Closed PerikiyoXD closed 7 months ago

PerikiyoXD commented 2 years ago

Project fabric.mod.json

{
  "schemaVersion": 1,
  "id": "dsurround",
  "version": "${version}",
  "name": "\u00a76Dynamic Surroundings\u00a7r: \u00a7eFabric Edition",
...

Output fabric.mod.json (jar)

{
  "schemaVersion": 1,
  "id": "dsurround",
  "version": "0.0.4",
  "name": "§6Dynamic Surroundings§r: §eFabric Edition",
...

As you can see, name escapes \u00a76 into § when resources are processed.

To fix the issue:

build.gradle:

     filesMatching("fabric.mod.json") {
-        expand "version": project.version
+        expand (version: project.version) {
+            escapeBackslash = true
+        }
     }
PerikiyoXD commented 2 years ago

This work has been done over fork/branch for 1.18.2. Extrapolates to this repo as well.

OreCruncher commented 7 months ago

Fixing up various json files to use the unicode escape. Will show up in the 1.20.4 update.

OreCruncher commented 7 months ago

Pushed 1.20.4 update to Modrinth and CurseForge (though Curse is going to take a bit to be available).