Skip to content

Commit 8bb7022

Browse files
committed
Merge 1.18 into 1.19.2
2 parents 53b7d34 + 2f3df11 commit 8bb7022

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/src/main/java/org/embeddedt/modernfix/dynamicresources/ModelBakeryHelpers.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ public static void gatherModelMaterials(ResourceManager manager, Predicate<PackR
166166
for(String namespace : pack.getNamespaces(PackType.CLIENT_RESOURCES)) {
167167
Collection<ResourceLocation> allBlockstates = pack.getResources(PackType.CLIENT_RESOURCES, namespace, "blockstates", p -> p.getPath().endsWith(".json"));
168168
for(ResourceLocation blockstate : allBlockstates) {
169-
allAvailableStates.add(new ResourceLocation(blockstate.getNamespace(), blockstate.getPath().replace("blockstates/", "").replace(".json", "")));
169+
allAvailableStates.add(new ResourceLocation(blockstate.getNamespace(), blockstate.getPath().replaceFirst("blockstates/", "").replace(".json", "")));
170170
}
171171
Collection<ResourceLocation> allModels = pack.getResources(PackType.CLIENT_RESOURCES, namespace, "models", p -> p.getPath().endsWith(".json"));
172172
for(ResourceLocation blockstate : allModels) {
173-
allAvailableModels.add(new ResourceLocation(blockstate.getNamespace(), blockstate.getPath().replace("models/", "").replace(".json", "")));
173+
allAvailableModels.add(new ResourceLocation(blockstate.getNamespace(), blockstate.getPath().replaceFirst("models/", "").replace(".json", "")));
174174
}
175175
}
176176
if(!isTrustedPack.test(pack)) {

0 commit comments

Comments
 (0)