mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-15 16:05:28 +00:00
Fixed #288 [gh#288]
This commit is contained in:
parent
a153f2ebdc
commit
7ade4762b9
@ -496,7 +496,7 @@ class Player{
|
|||||||
}
|
}
|
||||||
$this->dataPacket(MC_ANIMATE, array(
|
$this->dataPacket(MC_ANIMATE, array(
|
||||||
"eid" => $data["eid"],
|
"eid" => $data["eid"],
|
||||||
"action" => $data["action"],
|
"action" => $data["action"], //1 swing arm,
|
||||||
));
|
));
|
||||||
break;
|
break;
|
||||||
case "entity.metadata":
|
case "entity.metadata":
|
||||||
|
@ -31,7 +31,7 @@ class TrapdoorBlock extends TransparentBlock{
|
|||||||
$this->isActivable = true;
|
$this->isActivable = true;
|
||||||
}
|
}
|
||||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||||
if($target->isTransparent === false and $face !== 0 and $face !== 1){
|
if(($target->isTransparent === false or $target->getID() === SLAB) and $face !== 0 and $face !== 1){
|
||||||
$faces = array(
|
$faces = array(
|
||||||
2 => 0,
|
2 => 0,
|
||||||
3 => 1,
|
3 => 1,
|
||||||
|
@ -31,6 +31,13 @@ class BedBlock extends TransparentBlock{
|
|||||||
$this->isActivable = true;
|
$this->isActivable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function onActivate(Item $item, Player $player){
|
||||||
|
$player->dataPacket(MC_CLIENT_MESSAGE, array(
|
||||||
|
"message" => "This bed has been corrupted by your hands!"
|
||||||
|
));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||||
$down = $this->getSide(0);
|
$down = $this->getSide(0);
|
||||||
if($down->isTransparent === false){
|
if($down->isTransparent === false){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user