Fixed #187 Opening Chests with solid blocks on top

This commit is contained in:
Shoghi Cervantes Pueyo 2013-04-05 12:37:08 +02:00
parent 463e82a1e7
commit 93cfa035d4
2 changed files with 15 additions and 3 deletions

View file

@ -68,6 +68,9 @@ class BurningFurnaceBlock extends SolidBlock{
}
public function onActivate(BlockAPI $level, Item $item, Player $player){
if($this->inWorld !== true){
return false;
}
$server = ServerAPI::request();
$t = $server->api->tileentity->get($this);
$furnace = false;
@ -88,7 +91,7 @@ class BurningFurnaceBlock extends SolidBlock{
}
if($furnace->class !== TILE_FURNACE){
return false;
return true;
}
$id = $player->windowCnt = $player->windowCnt++ % 255;
$player->windows[$id] = $furnace;