mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 20:07:09 +00:00
McRegion: nbtDeserialize() cannot return null
This commit is contained in:
parent
07a156f5c4
commit
ff2e99ecdc
@ -96,7 +96,7 @@ class Anvil extends McRegion{
|
||||
]);
|
||||
}
|
||||
|
||||
protected function nbtDeserialize(string $data){
|
||||
protected function nbtDeserialize(string $data) : Chunk{
|
||||
$nbt = new BigEndianNBTStream();
|
||||
$chunk = $nbt->readCompressed($data);
|
||||
if(!($chunk instanceof CompoundTag) or !$chunk->hasTag("Level")){
|
||||
|
@ -107,9 +107,9 @@ class McRegion extends BaseLevelProvider{
|
||||
/**
|
||||
* @param string $data
|
||||
*
|
||||
* @return Chunk|null
|
||||
* @return Chunk
|
||||
*/
|
||||
protected function nbtDeserialize(string $data){
|
||||
protected function nbtDeserialize(string $data) : Chunk{
|
||||
$nbt = new BigEndianNBTStream();
|
||||
$chunk = $nbt->readCompressed($data);
|
||||
if(!($chunk instanceof CompoundTag) or !$chunk->hasTag("Level")){
|
||||
|
Loading…
x
Reference in New Issue
Block a user