fix(UC-02): LOW review items — anchored path strip + corner offset doc

- Use substring instead of replace for path cleanup (anchored, no double-strip risk)
- Document that corner_decorations ignores x/z offsets (by design)
This commit is contained in:
NotEvil
2026-04-16 02:32:50 +02:00
parent 8823c671d7
commit 6d56024c7e
2 changed files with 7 additions and 3 deletions

View File

@@ -637,6 +637,8 @@ public class HangingCagePiece extends StructurePiece {
int[][] corners = layout.innerCorners();
// Corner decorations (e.g. cobwebs low+high, soul fire, snow layers)
// Note: only y_offset is used here — x/z offsets are ignored because corners
// are placed at all 4 inner corners and direction logic would differ per corner.
for (DecorationConfig.PositionedBlock pb : deco.cornerDecorations()) {
for (int[] c : corners) {
if (layout.isInShape(c[0], c[1]) && !layout.isWall(c[0], c[1])) {

View File

@@ -60,9 +60,11 @@ public class RoomThemeReloadListener
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", "");
String rawPath = fileId.getPath();
String cleanPath = rawPath.substring(rawPath.indexOf(DIRECTORY + "/") + DIRECTORY.length() + 1);
if (cleanPath.endsWith(".json")) {
cleanPath = cleanPath.substring(0, cleanPath.length() - 5);
}
ResourceLocation cleanId = new ResourceLocation(fileId.getNamespace(), cleanPath);
try (InputStream input = resource.open()) {