Merge 1.18 into 1.19.2

This commit is contained in:
embeddedt 2023-11-05 21:59:08 -05:00
commit 8bb70222ce
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -166,11 +166,11 @@ public class ModelBakeryHelpers {
for(String namespace : pack.getNamespaces(PackType.CLIENT_RESOURCES)) {
Collection<ResourceLocation> allBlockstates = pack.getResources(PackType.CLIENT_RESOURCES, namespace, "blockstates", p -> p.getPath().endsWith(".json"));
for(ResourceLocation blockstate : allBlockstates) {
allAvailableStates.add(new ResourceLocation(blockstate.getNamespace(), blockstate.getPath().replace("blockstates/", "").replace(".json", "")));
allAvailableStates.add(new ResourceLocation(blockstate.getNamespace(), blockstate.getPath().replaceFirst("blockstates/", "").replace(".json", "")));
}
Collection<ResourceLocation> allModels = pack.getResources(PackType.CLIENT_RESOURCES, namespace, "models", p -> p.getPath().endsWith(".json"));
for(ResourceLocation blockstate : allModels) {
allAvailableModels.add(new ResourceLocation(blockstate.getNamespace(), blockstate.getPath().replace("models/", "").replace(".json", "")));
allAvailableModels.add(new ResourceLocation(blockstate.getNamespace(), blockstate.getPath().replaceFirst("models/", "").replace(".json", "")));
}
}
if(!isTrustedPack.test(pack)) {