Chests and furnaces drop their items on break

This commit is contained in:
Shoghi Cervantes
2013-06-07 12:44:10 +02:00
parent 45ee7ea7ae
commit fdb7af5df2
3 changed files with 37 additions and 22 deletions

View File

@@ -277,9 +277,7 @@ class BlockAPI{
if(($player->gamemode & 0x01) === 0x00 and count($drops) > 0){
foreach($drops as $drop){
for($c = 0; $c < $drop[2]; ++$c){
$this->server->api->entity->drop(new Position($target->x + 0.5, $target->y, $target->z + 0.5, $target->level), BlockAPI::getItem($drop[0] & 0xFFFF, $drop[1] & 0xFFFF, 1));
}
$this->server->api->entity->drop(new Position($target->x + 0.5, $target->y, $target->z + 0.5, $target->level), BlockAPI::getItem($drop[0] & 0xFFFF, $drop[1] & 0xFFFF, $drop[2]));
}
}
return false;