Merge 1.16 into 1.18

This commit is contained in:
embeddedt 2023-06-21 21:41:12 -04:00
commit 1ac69035ed
No known key found for this signature in database
GPG Key ID: A69433EC199B5613
2 changed files with 21 additions and 14 deletions

View File

@ -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:

View File

@ -105,7 +105,6 @@ 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) {
@ -116,10 +115,11 @@ public class ModelBakeryHelpers {
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; if(!isTrustedPack.test(pack)) {
}
ModernFix.LOGGER.debug("Pack with class {} needs manual scan", pack.getClass().getName()); ModernFix.LOGGER.debug("Pack with class {} needs manual scan", pack.getClass().getName());
return false; 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);