mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Merge branch 'stable' into next-minor
This commit is contained in:
@ -42,6 +42,7 @@ use pocketmine\world\utils\SubChunkExplorer;
|
||||
use pocketmine\world\utils\SubChunkExplorerStatus;
|
||||
use function ceil;
|
||||
use function floor;
|
||||
use function min;
|
||||
use function mt_rand;
|
||||
use function sqrt;
|
||||
|
||||
@ -90,9 +91,6 @@ class Explosion{
|
||||
|
||||
$blockFactory = BlockFactory::getInstance();
|
||||
|
||||
$currentChunk = null;
|
||||
$currentSubChunk = null;
|
||||
|
||||
$mRays = $this->rays - 1;
|
||||
for($i = 0; $i < $this->rays; ++$i){
|
||||
for($j = 0; $j < $this->rays; ++$j){
|
||||
@ -151,10 +149,8 @@ class Explosion{
|
||||
* and creating sounds and particles.
|
||||
*/
|
||||
public function explodeB() : bool{
|
||||
$updateBlocks = [];
|
||||
|
||||
$source = (new Vector3($this->source->x, $this->source->y, $this->source->z))->floor();
|
||||
$yield = (1 / $this->size) * 100;
|
||||
$yield = min(100, (1 / $this->size) * 100);
|
||||
|
||||
if($this->what instanceof Entity){
|
||||
$ev = new EntityExplodeEvent($this->what, $this->source, $this->affectedBlocks, $yield);
|
||||
|
@ -114,6 +114,9 @@ abstract class LightUpdate{
|
||||
$context->removalQueue->enqueue([$x, $y, $z, $oldLevel]);
|
||||
}
|
||||
}
|
||||
}elseif($this->getEffectiveLight($x, $y, $z) > 0){ //outside the chunk (e.g. virtual sky light from y=256)
|
||||
$context->spreadVisited[$blockHash] = true;
|
||||
$context->spreadQueue->enqueue([$x, $y, $z]);
|
||||
}
|
||||
}
|
||||
return $context;
|
||||
|
Reference in New Issue
Block a user