mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 16:45:13 +00:00
Base PHP7 work to make it "run" - READ NEXT LINES!
All plugins will need to bump the API if they want to use this. NOTE THAT THIS IS NOT THE FINAL API 2.0.0 AND THAT THERE WILL BE MORE CHANGES. To start updating, you might also want to read https://secure.php.net/manual/en/migration70.php and specifically https://secure.php.net/manual/en/migration70.incompatible.php To compile PHP7 with some of the required dependencies, use https://gist.github.com/shoghicp/166ab26ce5cc7a390f45 ONLY LINUX IS TESTED, DO NOT ASK FOR OTHER PLATFORMS! ----- THIS VERSION IS NOT SUPPORTED ----- This version WILL crash randomly in unexpected places due to PHP7, pthreads, PocketMine or cosmic rays. Handle with care, and store under direct sunlight for the best performance.
This commit is contained in:
@ -2607,7 +2607,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
}
|
||||
}
|
||||
$this->provider->unloadChunk($x, $z, $safe);
|
||||
}catch(\Exception $e){
|
||||
}catch(\Throwable $e){
|
||||
$logger = $this->server->getLogger();
|
||||
$logger->error($this->server->getLanguage()->translateString("pocketmine.level.chunkUnloadError", [$e->getMessage()]));
|
||||
if($logger instanceof MainLogger){
|
||||
|
@ -180,7 +180,7 @@ class Chunk extends BaseChunk{
|
||||
}
|
||||
|
||||
return new Chunk($provider instanceof LevelProvider ? $provider : Anvil::class, $chunk->Level);
|
||||
}catch(\Exception $e){
|
||||
}catch(\Throwable $e){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -203,7 +203,7 @@ class Chunk extends BaseChunk{
|
||||
}
|
||||
|
||||
return new Chunk($provider instanceof LevelProvider ? $provider : Anvil::class, $chunk->Level);
|
||||
}catch(\Exception $e){
|
||||
}catch(\Throwable $e){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -361,7 +361,7 @@ class Chunk extends BaseChunk{
|
||||
$chunk->nbt->LightPopulated = new ByteTag("LightPopulated", 0);
|
||||
|
||||
return $chunk;
|
||||
}catch(\Exception $e){
|
||||
}catch(\Throwable $e){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -305,7 +305,7 @@ class Chunk extends BaseFullChunk{
|
||||
$chunk->setLightPopulated();
|
||||
}
|
||||
return $chunk;
|
||||
}catch(\Exception $e){
|
||||
}catch(\Throwable $e){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -393,7 +393,7 @@ class Chunk extends BaseFullChunk{
|
||||
$chunk = new Chunk($provider instanceof LevelProvider ? $provider : LevelDB::class, $chunkX, $chunkZ, str_repeat("\x00", self::DATA_LENGTH));
|
||||
$chunk->skyLight = str_repeat("\xff", 16384);
|
||||
return $chunk;
|
||||
}catch(\Exception $e){
|
||||
}catch(\Throwable $e){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ class Chunk extends BaseFullChunk{
|
||||
}
|
||||
|
||||
return new Chunk($provider instanceof LevelProvider ? $provider : McRegion::class, $chunk->Level);
|
||||
}catch(\Exception $e){
|
||||
}catch(\Throwable $e){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -353,7 +353,7 @@ class Chunk extends BaseFullChunk{
|
||||
$chunk->nbt->LightPopulated = new ByteTag("LightPopulated", ($flags >> 2) & 0b1);
|
||||
|
||||
return $chunk;
|
||||
}catch(\Exception $e){
|
||||
}catch(\Throwable $e){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -461,7 +461,7 @@ class Chunk extends BaseFullChunk{
|
||||
$chunk->nbt->LightPopulated = new ByteTag("LightPopulated", 0);
|
||||
|
||||
return $chunk;
|
||||
}catch(\Exception $e){
|
||||
}catch(\Throwable $e){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ class RegionLoader{
|
||||
|
||||
try{
|
||||
$chunk = zlib_decode(substr($chunk, 5));
|
||||
}catch(\Exception $e){
|
||||
}catch(\Throwable $e){
|
||||
$this->locationTable[$i] = [0, 0, 0]; //Corrupted chunk, remove it
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user