Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken
2024-03-14 18:53:35 -04:00
44 changed files with 544 additions and 305 deletions

View File

@@ -218,7 +218,10 @@ public class Mods implements Loadable{
}
//this returns a *runnable* which actually packs the resulting pixmap; this has to be done synchronously outside the method
return () -> {
String fullName = (prefix ? mod.name + "-" : "") + baseName;
//don't prefix with mod name if it's already prefixed by a category, e.g. `block-modname-content-full`.
int hyphen = baseName.indexOf('-');
String fullName = ((prefix && !(hyphen != -1 && baseName.substring(hyphen + 1).startsWith(mod.name + "-"))) ? mod.name + "-" : "") + baseName;
packer.add(getPage(file), fullName, new PixmapRegion(pix));
if(textureScale != 1.0f){
textureResize.put(fullName, textureScale);