Merge 1.18 into 1.19.2
This commit is contained in:
commit
3acaa1dd49
|
|
@ -57,6 +57,32 @@ public class ModelBakeryHelpers {
|
||||||
*/
|
*/
|
||||||
public static final int MAX_MODEL_LIFETIME_SECS = 300;
|
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) {
|
private static JsonElement parseStream(InputStream stream) {
|
||||||
JsonParser parser = new JsonParser();
|
JsonParser parser = new JsonParser();
|
||||||
JsonReader jsonReader = new JsonReader(new InputStreamReader(stream, StandardCharsets.UTF_8));
|
JsonReader jsonReader = new JsonReader(new InputStreamReader(stream, StandardCharsets.UTF_8));
|
||||||
|
|
|
||||||
|
|
@ -257,25 +257,7 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
|
||||||
blockStateFiles, modelFiles, this.missingModel, json -> BlockModel.GSON.fromJson(json, BlockModel.class),
|
blockStateFiles, modelFiles, this.missingModel, json -> BlockModel.GSON.fromJson(json, BlockModel.class),
|
||||||
this::getModel);
|
this::getModel);
|
||||||
/* take every texture from these folders (1.19.3+ emulation) */
|
/* take every texture from these folders (1.19.3+ emulation) */
|
||||||
String[] extraFolders = new String[] {
|
String[] extraFolders = ModelBakeryHelpers.getExtraTextureFolders();
|
||||||
"attachment",
|
|
||||||
"bettergrass",
|
|
||||||
"block",
|
|
||||||
"blocks",
|
|
||||||
"cape",
|
|
||||||
"entity/bed",
|
|
||||||
"entity/chest",
|
|
||||||
"item",
|
|
||||||
"items",
|
|
||||||
"model",
|
|
||||||
"models",
|
|
||||||
"part",
|
|
||||||
"pipe",
|
|
||||||
"ropebridge",
|
|
||||||
"solid_block",
|
|
||||||
"spell_effect",
|
|
||||||
"spell_projectile"
|
|
||||||
};
|
|
||||||
for(String folder : extraFolders) {
|
for(String folder : extraFolders) {
|
||||||
Collection<ResourceLocation> textureLocations = this.resourceManager.listResources("textures/" + folder, p -> p.getPath().endsWith(".png")).keySet();
|
Collection<ResourceLocation> textureLocations = this.resourceManager.listResources("textures/" + folder, p -> p.getPath().endsWith(".png")).keySet();
|
||||||
for(ResourceLocation rl : textureLocations) {
|
for(ResourceLocation rl : textureLocations) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user