Skip to content

Commit

Permalink
Skip tags in render type map and warn
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Jul 14, 2024
1 parent 95d4d6d commit 43a4355
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ private static Int2ObjectLinkedOpenHashMap<List<BlockEntry>> parseBlockMap(Prope
/**
* Parses a render layer map.
* <p>
* This feature is used by Chocapic v9 and Wisdom Shaders. Otherwise, it is a rarely-used feature.
*/
private static Map<NamespacedId, BlockRenderType> parseRenderTypeMap(Properties properties, String keyPrefix, String fileName) {
Map<NamespacedId, BlockRenderType> overrides = new HashMap<>();
Expand All @@ -278,6 +277,10 @@ private static Map<NamespacedId, BlockRenderType> parseRenderTypeMap(Properties
}

for (String part : value.split("\\s+")) {
if (part.startsWith("%")) {
Iris.logger.fatal("Cannot use a tag in the render type map: " + key + " = " + value);
continue;
}
// Note: NamespacedId performs no validation on the content. That will need to be done by whatever is
// converting these things to ResourceLocations.
overrides.put(new NamespacedId(part), renderType);
Expand Down

0 comments on commit 43a4355

Please sign in to comment.