mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-29 22:45:00 +00:00
Added Farmland bounding box
This commit is contained in:
parent
cf542ac73a
commit
ccea26c978
@ -22,6 +22,7 @@
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
|
use pocketmine\math\AxisAlignedBB;
|
||||||
|
|
||||||
class Farmland extends Solid{
|
class Farmland extends Solid{
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
@ -29,6 +30,17 @@ class Farmland extends Solid{
|
|||||||
$this->hardness = 3;
|
$this->hardness = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getBoundingBox(){
|
||||||
|
return new AxisAlignedBB(
|
||||||
|
$this->x,
|
||||||
|
$this->y,
|
||||||
|
$this->z,
|
||||||
|
$this->x + 1,
|
||||||
|
$this->y + 0.9375,
|
||||||
|
$this->z + 1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public function getDrops(Item $item){
|
public function getDrops(Item $item){
|
||||||
return [
|
return [
|
||||||
[Item::DIRT, 0, 1],
|
[Item::DIRT, 0, 1],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user