Player construction now happens when we're ready to create the player entity

this fixes a wide range of bugs with the initial spawn sequence, and allows to simplify a whole lot of player setup logic.
This commit is contained in:
Dylan K. Taylor
2019-03-23 10:13:14 +00:00
parent 433dab078b
commit 9ec62643d5
7 changed files with 137 additions and 160 deletions

View File

@ -378,12 +378,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
/** @var TimingsHandler */
protected $timings;
/** @var bool */
protected $constructed = false;
public function __construct(Level $level, CompoundTag $nbt){
$this->constructed = true;
$this->timings = Timings::getEntityTimings($this);
$this->temporalVector = new Vector3();