mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-08 04:38:35 +00:00
Fixed Torch block target
This commit is contained in:
parent
399050fc4e
commit
b45676d2b5
@ -32,8 +32,7 @@ class TorchBlock extends FlowableBlock{
|
|||||||
|
|
||||||
public function place(BlockAPI $level, Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
public function place(BlockAPI $level, Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||||
if($block->inWorld === true){
|
if($block->inWorld === true){
|
||||||
$down = $level->getBlockFace($block, 0);
|
if($target->isTransparent === false and $face !== 0){
|
||||||
if($down->isTransparent === false and $face !== 0){
|
|
||||||
$faces = array(
|
$faces = array(
|
||||||
1 => 5,
|
1 => 5,
|
||||||
2 => 4,
|
2 => 4,
|
||||||
@ -48,7 +47,7 @@ class TorchBlock extends FlowableBlock{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
public function getDrops(Item $item, Player $player){
|
public function getDrops(Item $item, Player $player){
|
||||||
return = array(
|
return array(
|
||||||
array($this->id, 0, 1),
|
array($this->id, 0, 1),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ class SaplingBlock extends TransparentBlock{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getDrops(Item $item, Player $player){
|
public function getDrops(Item $item, Player $player){
|
||||||
return = array(
|
return array(
|
||||||
array($this->id, $this->meta & 0x03, 1),
|
array($this->id, $this->meta & 0x03, 1),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ class SlabBlock extends TransparentBlock{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
public function getDrops(Item $item, Player $player){
|
public function getDrops(Item $item, Player $player){
|
||||||
return = array(
|
return array(
|
||||||
array($this->id, $this->meta & 0x07, 1),
|
array($this->id, $this->meta & 0x07, 1),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user