NostalgiaCore/src/material/block/solid/GravelBlock.php
2023-01-04 20:46:17 +03:00

20 lines
No EOL
336 B
PHP

<?php
class GravelBlock extends FallableBlock{
public function __construct(){
parent::__construct(GRAVEL, 0, "Gravel");
$this->hardness = 3;
}
public function getDrops(Item $item, Player $player){
if(mt_rand(1,10) === 1){
return array(
array(FLINT, 0, 1),
);
}
return array(
array(GRAVEL, 0, 1),
);
}
}