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