waterlogging support

This commit is contained in:
ForestOfLight
2025-07-10 15:24:32 -07:00
Unverified
parent 357327e9b0
commit 9bb2b002c9
5 changed files with 18 additions and 8 deletions
+6 -4
View File
@@ -32,11 +32,13 @@ class BlockInfo {
static getBlockMessage(block) {
if (!block)
return '§7Unknown';
let output = `§a${block.type.id}`;
const states = block.getAllStates();
if (Object.keys(states).length === 0)
return `§a${block.type.id}`;
else
return `§a${block.type.id}\n§7${this.getFormattedStates(states)}`;
if (Object.keys(states).length > 0)
output += `\n§7${this.getFormattedStates(states)}`;
if (block.isWaterlogged)
output += `\n§7isWaterlogged: §3true`;
return output;
}
static getFormattedStates(states) {