mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-19 04:05:31 +00:00
Fix some issues with entities in leveldb worlds
This commit is contained in:
parent
2a67507997
commit
b4a149cce8
@ -359,8 +359,11 @@ abstract class Entity extends Location implements Metadatable{
|
||||
$this->namedtag->Rotation[1]
|
||||
);
|
||||
|
||||
|
||||
if(isset($this->namedtag->Motion)){
|
||||
$this->setMotion($this->temporalVector->setComponents($this->namedtag["Motion"][0], $this->namedtag["Motion"][1], $this->namedtag["Motion"][2]));
|
||||
}else{
|
||||
$this->setMotion($this->temporalVector->setComponents(0, 0, 0));
|
||||
}
|
||||
|
||||
assert(!is_nan($this->x) and !is_infinite($this->x) and !is_nan($this->y) and !is_infinite($this->y) and !is_nan($this->z) and !is_infinite($this->z));
|
||||
|
||||
|
@ -403,6 +403,12 @@ class LevelDB extends BaseLevelProvider{
|
||||
}
|
||||
}
|
||||
|
||||
foreach($entities as $entityNBT){
|
||||
if($entityNBT->id instanceof IntTag){
|
||||
$entityNBT["id"] &= 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
$tiles = [];
|
||||
if(($tileData = $this->db->get($index . self::TAG_BLOCK_ENTITY)) !== false and strlen($tileData) > 0){
|
||||
$nbt->read($tileData, true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user