I need place block with ID = 380 (Item::CAULDRON) I got error, when I use $level->setblock(...): Code: InvalidArgumentException: "Block ID 380 is out of bounds" (EXCEPTION) in "src/pocketmine/block/BlockFactory" at line 386 Why?
It seems the id of the block is 118 as can be seen here https://github.com/pmmp/PocketMine-MP/blob/stable/src/pocketmine/block/BlockIds.php#L146 You should consider using BlockIds::CAULDRON_BLOCK, which will work across updates, using static ids is a bad idea
If I need add custom block class and register him, how I can use dynamic ids? BlockFactory::registerBlock(new CustomBlock(ID));