lazuli-api
Version:
Add some useful instances for Minecraft Bedrock Edition
21 lines (19 loc) • 471 B
text/typescript
import { Block } from "@minecraft/server";
/**
* Some test sets of blocks.
*/
export class BlockTest {
/**
* Test whether the block can get items by {@link Block.getItemStack}
* @param block
*/
static haveItemStack(block: Block): boolean {
if (block.getItemStack()) {
console.warn("The block has block item");
return true;
} else {
console.warn("The block has no block item");
return false;
}
}
}