mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 16:49:53 +00:00
Correct item drop related to explosion power
This commit is contained in:
parent
2271d0b6fc
commit
f56dd60708
@ -106,7 +106,7 @@ class Explosion{
|
|||||||
$server->api->entity->spawnToAll($e);
|
$server->api->entity->spawnToAll($e);
|
||||||
}
|
}
|
||||||
$send[] = new Vector3($block->x - $source->x, $block->y - $source->y, $block->z - $source->z);
|
$send[] = new Vector3($block->x - $source->x, $block->y - $source->y, $block->z - $source->z);
|
||||||
if(mt_rand(0, 100) < 30){
|
if(mt_rand(0, 10000) < ((1/$this->size) * 10000)){
|
||||||
$server->api->entity->drop(new Position($block->x + 0.5, $block->y, $block->z + 0.5, $this->level), BlockAPI::getItem($block->getID(), $block->getMetadata()));
|
$server->api->entity->drop(new Position($block->x + 0.5, $block->y, $block->z + 0.5, $this->level), BlockAPI::getItem($block->getID(), $block->getMetadata()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user