mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Fix TNT
This commit is contained in:
parent
4ee56a48aa
commit
5349f16464
1 changed files with 5 additions and 2 deletions
|
|
@ -56,8 +56,11 @@ class Explosion{
|
|||
$e = $server->api->entity->add($this->level, ENTITY_OBJECT, OBJECT_PRIMEDTNT, $data);
|
||||
$server->api->entity->spawnToAll($e);
|
||||
}elseif(mt_rand(0, 10000) < ((1/$this->size) * 10000)){
|
||||
foreach($block->getDrops($this->air, $this->nullPlayer) as $drop){
|
||||
$server->api->entity->drop(new Position($block->x + 0.5, $block->y, $block->z + 0.5, $this->level), BlockAPI::getItem($drop[0], $drop[1],$drop[2])); //id, meta, count
|
||||
$tmp = $block->getDrops($this->air, $this->nullPlayer);
|
||||
if(is_array($tmp)){
|
||||
foreach($tmp as $drop){
|
||||
$server->api->entity->drop(new Position($block->x + 0.5, $block->y, $block->z + 0.5, $this->level), BlockAPI::getItem($drop[0], $drop[1],$drop[2])); //id, meta, count
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->level->level->setBlockID($block->x, $block->y, $block->z, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue