Merge 1.16 into 1.18
This commit is contained in:
commit
1ac69035ed
8
.github/workflows/gradle.yml
vendored
8
.github/workflows/gradle.yml
vendored
|
|
@ -3,7 +3,13 @@
|
||||||
|
|
||||||
name: Build mod
|
name: Build mod
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '**'
|
||||||
|
tags-ignore:
|
||||||
|
- '**'
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
|
||||||
|
|
@ -105,21 +105,21 @@ public class ModelBakeryHelpers {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
allPackResources.removeIf(pack -> {
|
allPackResources.removeIf(pack -> {
|
||||||
if(isTrustedPack.test(pack)) {
|
for(String namespace : pack.getNamespaces(PackType.CLIENT_RESOURCES)) {
|
||||||
for(String namespace : pack.getNamespaces(PackType.CLIENT_RESOURCES)) {
|
Collection<ResourceLocation> allBlockstates = pack.getResources(PackType.CLIENT_RESOURCES, namespace, "blockstates", Integer.MAX_VALUE, p -> p.endsWith(".json"));
|
||||||
Collection<ResourceLocation> allBlockstates = pack.getResources(PackType.CLIENT_RESOURCES, namespace, "blockstates", Integer.MAX_VALUE, p -> p.endsWith(".json"));
|
for(ResourceLocation blockstate : allBlockstates) {
|
||||||
for(ResourceLocation blockstate : allBlockstates) {
|
allAvailableStates.add(new ResourceLocation(blockstate.getNamespace(), blockstate.getPath().replace("blockstates/", "").replace(".json", "")));
|
||||||
allAvailableStates.add(new ResourceLocation(blockstate.getNamespace(), blockstate.getPath().replace("blockstates/", "").replace(".json", "")));
|
}
|
||||||
}
|
Collection<ResourceLocation> allModels = pack.getResources(PackType.CLIENT_RESOURCES, namespace, "models", Integer.MAX_VALUE, p -> p.endsWith(".json"));
|
||||||
Collection<ResourceLocation> allModels = pack.getResources(PackType.CLIENT_RESOURCES, namespace, "models", Integer.MAX_VALUE, p -> p.endsWith(".json"));
|
for(ResourceLocation blockstate : allModels) {
|
||||||
for(ResourceLocation blockstate : allModels) {
|
allAvailableModels.add(new ResourceLocation(blockstate.getNamespace(), blockstate.getPath().replace("models/", "").replace(".json", "")));
|
||||||
allAvailableModels.add(new ResourceLocation(blockstate.getNamespace(), blockstate.getPath().replace("models/", "").replace(".json", "")));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
ModernFix.LOGGER.debug("Pack with class {} needs manual scan", pack.getClass().getName());
|
if(!isTrustedPack.test(pack)) {
|
||||||
return false;
|
ModernFix.LOGGER.debug("Pack with class {} needs manual scan", pack.getClass().getName());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
gatherAdditionalViaManualScan(allPackResources, allAvailableStates, blockStateFiles, "blockstates/");
|
gatherAdditionalViaManualScan(allPackResources, allAvailableStates, blockStateFiles, "blockstates/");
|
||||||
|
|
@ -215,6 +215,7 @@ public class ModelBakeryHelpers {
|
||||||
blockStateData = null;
|
blockStateData = null;
|
||||||
blockStateLoadedFiles.clear();
|
blockStateLoadedFiles.clear();
|
||||||
|
|
||||||
|
modelFiles.addAll(allAvailableModels);
|
||||||
/* figure out which models we should actually load */
|
/* figure out which models we should actually load */
|
||||||
gatherAdditionalViaManualScan(allPackResources, allAvailableModels, modelFiles, "models/");
|
gatherAdditionalViaManualScan(allPackResources, allAvailableModels, modelFiles, "models/");
|
||||||
modelFiles.retainAll(allAvailableModels);
|
modelFiles.retainAll(allAvailableModels);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user