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:
@@ -637,6 +637,8 @@ public class HangingCagePiece extends StructurePiece {
|
|||||||
int[][] corners = layout.innerCorners();
|
int[][] corners = layout.innerCorners();
|
||||||
|
|
||||||
// Corner decorations (e.g. cobwebs low+high, soul fire, snow layers)
|
// 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 (DecorationConfig.PositionedBlock pb : deco.cornerDecorations()) {
|
||||||
for (int[] c : corners) {
|
for (int[] c : corners) {
|
||||||
if (layout.isInShape(c[0], c[1]) && !layout.isWall(c[0], c[1])) {
|
if (layout.isInShape(c[0], c[1]) && !layout.isWall(c[0], c[1])) {
|
||||||
|
|||||||
@@ -60,9 +60,11 @@ public class RoomThemeReloadListener
|
|||||||
Resource resource = entry.getValue();
|
Resource resource = entry.getValue();
|
||||||
|
|
||||||
// Derive clean ID from file path: "tiedup:tiedup_room_themes/oubliette.json" -> "tiedup:oubliette"
|
// Derive clean ID from file path: "tiedup:tiedup_room_themes/oubliette.json" -> "tiedup:oubliette"
|
||||||
String cleanPath = fileId.getPath()
|
String rawPath = fileId.getPath();
|
||||||
.replace(DIRECTORY + "/", "")
|
String cleanPath = rawPath.substring(rawPath.indexOf(DIRECTORY + "/") + DIRECTORY.length() + 1);
|
||||||
.replace(".json", "");
|
if (cleanPath.endsWith(".json")) {
|
||||||
|
cleanPath = cleanPath.substring(0, cleanPath.length() - 5);
|
||||||
|
}
|
||||||
ResourceLocation cleanId = new ResourceLocation(fileId.getNamespace(), cleanPath);
|
ResourceLocation cleanId = new ResourceLocation(fileId.getNamespace(), cleanPath);
|
||||||
|
|
||||||
try (InputStream input = resource.open()) {
|
try (InputStream input = resource.open()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user