mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Place/Breaking/Activation logic separated from BlockAPI
This commit is contained in:
parent
6156baab85
commit
d9c87161ba
37 changed files with 387 additions and 216 deletions
|
|
@ -29,5 +29,18 @@ class TNTBlock extends SolidBlock{
|
|||
public function __construct(){
|
||||
parent::__construct(TNT, 0, "TNT");
|
||||
}
|
||||
|
||||
public function getDrops(Item $item, Player $player){
|
||||
if($this->inWorld === true){
|
||||
$player->dataPacket(MC_EXPLOSION, array(
|
||||
"x" => $this->x,
|
||||
"y" => $this->y,
|
||||
"z" => $this->z,
|
||||
"radius" => 2,
|
||||
"records" => array(),
|
||||
));
|
||||
}
|
||||
return array(
|
||||
array(TNT, 0, 1),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue