mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Fix build
This commit is contained in:
@ -35,6 +35,7 @@ use pocketmine\event\entity\EntityExplodeEvent;
|
||||
use pocketmine\item\VanillaItems;
|
||||
use pocketmine\math\AxisAlignedBB;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\utils\AssumptionFailedError;
|
||||
use pocketmine\world\format\SubChunk;
|
||||
use pocketmine\world\particle\HugeExplodeSeedParticle;
|
||||
use pocketmine\world\sound\ExplodeSound;
|
||||
@ -111,8 +112,12 @@ class Explosion{
|
||||
if($this->subChunkExplorer->moveTo($vBlockX, $vBlockY, $vBlockZ) === SubChunkExplorerStatus::INVALID){
|
||||
continue;
|
||||
}
|
||||
$subChunk = $this->subChunkExplorer->currentSubChunk;
|
||||
if($subChunk === null){
|
||||
throw new AssumptionFailedError("SubChunkExplorer subchunk should not be null here");
|
||||
}
|
||||
|
||||
$state = $this->subChunkExplorer->currentSubChunk->getBlockStateId($vBlockX & SubChunk::COORD_MASK, $vBlockY & SubChunk::COORD_MASK, $vBlockZ & SubChunk::COORD_MASK);
|
||||
$state = $subChunk->getBlockStateId($vBlockX & SubChunk::COORD_MASK, $vBlockY & SubChunk::COORD_MASK, $vBlockZ & SubChunk::COORD_MASK);
|
||||
|
||||
$blastResistance = $blockFactory->blastResistance[$state] ?? 0;
|
||||
if($blastResistance >= 0){
|
||||
|
@ -25,6 +25,7 @@ namespace pocketmine\world\generator\hell;
|
||||
|
||||
use pocketmine\block\VanillaBlocks;
|
||||
use pocketmine\data\bedrock\BiomeIds;
|
||||
use pocketmine\utils\AssumptionFailedError;
|
||||
use pocketmine\world\biome\BiomeRegistry;
|
||||
use pocketmine\world\ChunkManager;
|
||||
use pocketmine\world\format\Chunk;
|
||||
@ -71,7 +72,8 @@ class Nether extends Generator{
|
||||
|
||||
$noise = $this->noiseBase->getFastNoise3D(Chunk::EDGE_LENGTH, 128, Chunk::EDGE_LENGTH, 4, 8, 4, $chunkX * Chunk::EDGE_LENGTH, 0, $chunkZ * Chunk::EDGE_LENGTH);
|
||||
|
||||
$chunk = $world->getChunk($chunkX, $chunkZ);
|
||||
//TODO: why don't we just create and set the chunk here directly?
|
||||
$chunk = $world->getChunk($chunkX, $chunkZ) ?? throw new \InvalidArgumentException("Chunk $chunkX $chunkZ does not yet exist");
|
||||
|
||||
$bedrock = VanillaBlocks::BEDROCK()->getStateId();
|
||||
$netherrack = VanillaBlocks::NETHERRACK()->getStateId();
|
||||
|
@ -141,7 +141,8 @@ class Normal extends Generator{
|
||||
|
||||
$noise = $this->noiseBase->getFastNoise3D(Chunk::EDGE_LENGTH, 128, Chunk::EDGE_LENGTH, 4, 8, 4, $chunkX * Chunk::EDGE_LENGTH, 0, $chunkZ * Chunk::EDGE_LENGTH);
|
||||
|
||||
$chunk = $world->getChunk($chunkX, $chunkZ);
|
||||
//TODO: why don't we just create and set the chunk here directly?
|
||||
$chunk = $world->getChunk($chunkX, $chunkZ) ?? throw new \InvalidArgumentException("Chunk $chunkX $chunkZ does not yet exist");
|
||||
|
||||
$biomeCache = [];
|
||||
|
||||
|
@ -36,7 +36,7 @@ use function min;
|
||||
class GroundCover implements Populator{
|
||||
|
||||
public function populate(ChunkManager $world, int $chunkX, int $chunkZ, Random $random) : void{
|
||||
$chunk = $world->getChunk($chunkX, $chunkZ);
|
||||
$chunk = $world->getChunk($chunkX, $chunkZ) ?? throw new \InvalidArgumentException("Chunk $chunkX $chunkZ does not yet exist");
|
||||
$factory = RuntimeBlockStateRegistry::getInstance();
|
||||
$biomeRegistry = BiomeRegistry::getInstance();
|
||||
for($x = 0; $x < Chunk::EDGE_LENGTH; ++$x){
|
||||
|
Reference in New Issue
Block a user