Fixed Torch block target

This commit is contained in:
Shoghi Cervantes Pueyo 2013-02-03 20:47:58 +01:00
parent 399050fc4e
commit b45676d2b5
3 changed files with 4 additions and 5 deletions

View File

@ -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){
if($block->inWorld === true){
$down = $level->getBlockFace($block, 0);
if($down->isTransparent === false and $face !== 0){
if($target->isTransparent === false and $face !== 0){
$faces = array(
1 => 5,
2 => 4,
@ -48,7 +47,7 @@ class TorchBlock extends FlowableBlock{
return false;
}
public function getDrops(Item $item, Player $player){
return = array(
return array(
array($this->id, 0, 1),
);
}

View File

@ -79,7 +79,7 @@ class SaplingBlock extends TransparentBlock{
}
public function getDrops(Item $item, Player $player){
return = array(
return array(
array($this->id, $this->meta & 0x03, 1),
);
}

View File

@ -77,7 +77,7 @@ class SlabBlock extends TransparentBlock{
return false;
}
public function getDrops(Item $item, Player $player){
return = array(
return array(
array($this->id, $this->meta & 0x07, 1),
);
}