Add runes/ to legacy texture folder list

This commit is contained in:
embeddedt 2023-08-16 08:48:30 -04:00
parent b54c6751a4
commit 2629cd484a
No known key found for this signature in database
GPG Key ID: A69433EC199B5613
2 changed files with 27 additions and 19 deletions

View File

@ -57,6 +57,32 @@ public class ModelBakeryHelpers {
*/
public static final int MAX_MODEL_LIFETIME_SECS = 300;
/**
* These folders will have all textures stitched onto the atlas when dynamic resources is enabled.
*/
public static String[] getExtraTextureFolders() {
return new String[] {
"attachment",
"bettergrass",
"block",
"blocks",
"cape",
"entity/bed",
"entity/chest",
"item",
"items",
"model",
"models",
"part",
"pipe",
"ropebridge",
"runes",
"solid_block",
"spell_effect",
"spell_projectile"
};
}
private static JsonElement parseStream(InputStream stream) {
JsonParser parser = new JsonParser();
JsonReader jsonReader = new JsonReader(new InputStreamReader(stream, StandardCharsets.UTF_8));

View File

@ -254,25 +254,7 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
blockStateFiles, modelFiles, this.missingModel, json -> BlockModel.GSON.fromJson(json, BlockModel.class),
this::getModel);
/* take every texture from these folders (1.19.3+ emulation) */
String[] extraFolders = new String[] {
"attachment",
"bettergrass",
"block",
"blocks",
"cape",
"entity/bed",
"entity/chest",
"item",
"items",
"model",
"models",
"part",
"pipe",
"ropebridge",
"solid_block",
"spell_effect",
"spell_projectile"
};
String[] extraFolders = ModelBakeryHelpers.getExtraTextureFolders();
for(String folder : extraFolders) {
Collection<ResourceLocation> textureLocations = this.resourceManager.listResources("textures/" + folder, p -> p.endsWith(".png"));
for(ResourceLocation rl : textureLocations) {