chore/audit-uc02-roomtheme-datadriven #14
@@ -59,8 +59,14 @@ public class RoomThemeReloadListener
|
||||
ResourceLocation fileId = entry.getKey();
|
||||
Resource resource = entry.getValue();
|
||||
|
||||
// Derive clean ID from file path: "tiedup:tiedup_room_themes/oubliette.json" -> "tiedup:oubliette"
|
||||
String cleanPath = fileId.getPath()
|
||||
.replace(DIRECTORY + "/", "")
|
||||
.replace(".json", "");
|
||||
ResourceLocation cleanId = new ResourceLocation(fileId.getNamespace(), cleanPath);
|
||||
|
||||
try (InputStream input = resource.open()) {
|
||||
RoomThemeDefinition def = RoomThemeParser.parse(input, fileId);
|
||||
RoomThemeDefinition def = RoomThemeParser.parse(input, cleanId);
|
||||
|
||||
if (def != null) {
|
||||
// Check for duplicate IDs (fileId IS the ID for room themes)
|
||||
|
||||
Reference in New Issue
Block a user