Merge 1.16 into 1.18
This commit is contained in:
commit
2e8b11de93
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -261,25 +261,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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user