Skip to content

Commit 2f3df11

Browse files
committed
Merge 1.16 into 1.18
2 parents 2ecd0c6 + 134dc0e commit 2f3df11

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
@@ -167,11 +167,11 @@ public static void gatherModelMaterials(ResourceManager manager, Predicate<PackR
167167
for(String namespace : pack.getNamespaces(PackType.CLIENT_RESOURCES)) {
168168
Collection<ResourceLocation> allBlockstates = pack.getResources(PackType.CLIENT_RESOURCES, namespace, "blockstates", Integer.MAX_VALUE, p -> p.endsWith(".json"));
169169
for(ResourceLocation blockstate : allBlockstates) {
170-
allAvailableStates.add(new ResourceLocation(blockstate.getNamespace(), blockstate.getPath().replace("blockstates/", "").replace(".json", "")));
170+
allAvailableStates.add(new ResourceLocation(blockstate.getNamespace(), blockstate.getPath().replaceFirst("blockstates/", "").replace(".json", "")));
171171
}
172172
Collection<ResourceLocation> allModels = pack.getResources(PackType.CLIENT_RESOURCES, namespace, "models", Integer.MAX_VALUE, p -> p.endsWith(".json"));
173173
for(ResourceLocation blockstate : allModels) {
174-
allAvailableModels.add(new ResourceLocation(blockstate.getNamespace(), blockstate.getPath().replace("models/", "").replace(".json", "")));
174+
allAvailableModels.add(new ResourceLocation(blockstate.getNamespace(), blockstate.getPath().replaceFirst("models/", "").replace(".json", "")));
175175
}
176176
}
177177
if(!isTrustedPack.test(pack)) {

0 commit comments

Comments
 (0)