Move base offset to Human from Player

fixes jojoe77777/Slapper#58
This commit is contained in:
Dylan K. Taylor 2017-07-03 19:58:07 +01:00
parent c2dfef700f
commit d474f73665
2 changed files with 2 additions and 2 deletions

View File

@ -291,8 +291,6 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
protected $stepHeight = 0.6;
protected $baseOffset = 1.62;
public $usedChunks = [];
protected $chunkLoadCount = 0;
protected $loadQueue = [];

View File

@ -71,6 +71,8 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
protected $totalXp = 0;
protected $xpSeed;
protected $baseOffset = 1.62;
public function __construct(Level $level, CompoundTag $nbt){
if($this->skin === "" and (!isset($nbt->Skin) or !isset($nbt->Skin->Data) or !Player::isValidSkin($nbt->Skin->Data->getValue()))){
throw new \InvalidStateException((new \ReflectionClass($this))->getShortName() . " must have a valid skin set");