nicer formatting for structure blockstates

This commit is contained in:
ForestOfLight
2025-04-12 20:05:10 -07:00
Unverified
parent e43fb49d48
commit 8da6474b38
+5 -1
View File
@@ -21,7 +21,11 @@ class BlockInfo {
const states = block.getAllStates();
if (Object.keys(states).length === 0)
return `Structure:\n§a${block.type.id}`;
return `Structure:\n§a${block.type.id}\n§7${JSON.stringify(block.getAllStates())}`;
return `Structure:\n§a${block.type.id}\n§7${this.getFormattedStates(states)}`;
}
static getFormattedStates(states) {
return Object.entries(states).map(([key, value]) => `§7${key}: ${value}`).join('\n');
}
}