I am trying to use the function $level->setBlock(), but I am not sure what parameters to use. For example, when a player destroys a block at (new Vector3(X,Y,Z)), how do I turn the block at (new Vector3(X,Y,Z+1)) to air? I know I should use PHP: $level->setBlock(new Vector3(X,Y,Z+1), $block) , but how do I make a block? I tried PHP: new Block(0) , but error dump said Block cannot be instaniated. PLEASE HELP.
Usage: Code: $air = BlockAPI::get(0, 0); $level->setBlock(new Vector3($x, $y, $z + 1), $air); Where the first 0 in the Block API is the air block ID, and the second 0 is the binary indicator, which is usually not used. The rest is pretty much self-explanatory.
If you mean the parameters of BlockAPI then yes you are right, you can leave it at 0. Don't completely leave it out though, just set it to 0.