mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +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();
|
$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")){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user