Faithful-Resource-Pack / API

A public API for Faithful Resource Pack textures, add-ons and more
https://api.faithfulpack.net
GNU Affero General Public License v3.0
0 stars 0 forks source link

Do not ever assume file paths always start with `assets/minecraft/` in Java Edition #28

Closed Pomi108 closed 1 year ago

Pomi108 commented 1 year ago

(I am assuming this is an API problem, if it's a web app issue please let me know.)

Currently, the API always assumes that most paths in Java Edition start with assets/minecraft/ and tends to force-add this prefix to them in requests if they don't have it already. This more often than not leads to wrong image links, and really only creates issues.

Example: obrazek obrazek

Despite the path being correct in the database, the actual request looks like this: obrazek

The API should stop making any sorts of assumptions about the Java Edition paths and simply use them, unchanged, as they are in the database. This would allow the web app and the bot to finally work with textures from 1.4.6 and b1.7.3, and probably some modded textures as well. Resolving this issue would also allow us to make multi-version packs with the new overlay system introduced in 23w31a without any large changes to the existing database system, as textures intended to be used in overlays could simply have [overlay name]/ prefixed before their existing paths.

TheRolfFR commented 1 year ago

I could disable the forced assets/minecraft, HOWEVER, does it mean it has to be explicited inside the use assets field (meanin that it that will include it into the use paths API results) ?

Pomi108 commented 1 year ago

Kind of? Ideally the path field alone should determine the file location of a texture. Separating the assets folder into another field like we do now is just confusing and impractical