waterlogging support
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -31,6 +31,7 @@ export class Structure {
|
||||
if (!blockPermutation)
|
||||
return void 0;
|
||||
blockPermutation.location = structureLocation;
|
||||
blockPermutation.isWaterlogged = this.#structure.getIsWaterlogged(blockPermutation.location);
|
||||
return blockPermutation;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,8 @@ export class BlockVerifier {
|
||||
return worldPermuation.type.id === structurePermuation.type.id;
|
||||
}
|
||||
|
||||
isExactMatch(worldPermuation, structurePermuation) {
|
||||
return worldPermuation.matches(structurePermuation.type.id, structurePermuation.getAllStates());
|
||||
isExactMatch(worldPermutation, structurePermutation) {
|
||||
return worldPermutation.matches(structurePermutation.type.id, structurePermutation.getAllStates())
|
||||
&& this.block.isWaterlogged === structurePermutation.isWaterlogged;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user