mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Fixed entities not loading on imported MCPE worlds
This commit is contained in:
@ -207,6 +207,9 @@ final class EntityFactory{
|
||||
*/
|
||||
public static function createFromData(Level $level, CompoundTag $nbt) : ?Entity{
|
||||
$saveId = $nbt->getTag("id");
|
||||
if($saveId === null){
|
||||
$saveId = $nbt->getTag("identifier"); //new MCPE format
|
||||
}
|
||||
$baseClass = null;
|
||||
if($saveId instanceof StringTag){
|
||||
$baseClass = self::$knownEntities[$saveId->getValue()] ?? null;
|
||||
|
Reference in New Issue
Block a user