mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 14:35:35 +00:00
Players can put out fires
This commit is contained in:
parent
1cc19ae1e8
commit
cbe0692696
@ -327,6 +327,9 @@ class BlockAPI{
|
|||||||
if($item->isPlaceable()){
|
if($item->isPlaceable()){
|
||||||
$hand = $item->getBlock();
|
$hand = $item->getBlock();
|
||||||
$hand->position($block);
|
$hand->position($block);
|
||||||
|
}elseif($block->getID() === FIRE){
|
||||||
|
$player->level->setBlock($block, new AirBlock());
|
||||||
|
return false;
|
||||||
}else{
|
}else{
|
||||||
return $this->cancelAction($block, $player, false);
|
return $this->cancelAction($block, $player, false);
|
||||||
}
|
}
|
||||||
|
@ -1084,9 +1084,9 @@ class Player{
|
|||||||
"eid" => 0,
|
"eid" => 0,
|
||||||
));
|
));
|
||||||
if(($this->gamemode & 0x01) === 0x01){
|
if(($this->gamemode & 0x01) === 0x01){
|
||||||
$this->slot = 7;
|
$this->slot = -1;//7
|
||||||
}else{
|
}else{
|
||||||
$this->slot = 0;
|
$this->slot = -1;//0
|
||||||
}
|
}
|
||||||
$this->entity = $this->server->api->entity->add($this->level, ENTITY_PLAYER, 0, array("player" => $this));
|
$this->entity = $this->server->api->entity->add($this->level, ENTITY_PLAYER, 0, array("player" => $this));
|
||||||
$this->eid = $this->entity->eid;
|
$this->eid = $this->entity->eid;
|
||||||
|
@ -29,6 +29,7 @@ class FireBlock extends FlowableBlock{
|
|||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
parent::__construct(FIRE, $meta, "Fire");
|
parent::__construct(FIRE, $meta, "Fire");
|
||||||
$this->isReplaceable = true;
|
$this->isReplaceable = true;
|
||||||
|
$this->breakable = false;
|
||||||
$this->isFullBlock = true;
|
$this->isFullBlock = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user