Merged master into php7 to support 0.13.1

This commit is contained in:
Intyre
2016-01-22 17:36:45 +01:00
117 changed files with 2732 additions and 393 deletions

View File

@ -57,15 +57,15 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
public $height = 1.8;
public $eyeHeight = 1.62;
protected $skinName;
protected $skin;
protected $isSlim = false;
public function getSkinData(){
return $this->skin;
}
public function isSkinSlim(){
return $this->isSlim;
public function getSkinName(){
return $this->skinName;
}
/**
@ -84,11 +84,11 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
/**
* @param string $str
* @param bool $isSlim
* @param string $skinName
*/
public function setSkin($str, $isSlim = false){
public function setSkin($str, $skinName){
$this->skin = $str;
$this->isSlim = (bool) $isSlim;
$this->skinName = $skinName;
}
public function getInventory(){
@ -112,7 +112,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
}
if(isset($this->namedtag->Skin) and $this->namedtag->Skin instanceof CompoundTag){
$this->setSkin($this->namedtag->Skin["Data"], $this->namedtag->Skin["Slim"] > 0);
$this->setSkin($this->namedtag->Skin["Data"], $this->namedtag->Skin["Name"]);
}
$this->uuid = UUID::fromData($this->getId(), $this->getSkinData(), $this->getNameTag());
@ -195,7 +195,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
if(strlen($this->getSkinData()) > 0){
$this->namedtag->Skin = new CompoundTag("Skin", [
"Data" => new StringTag("Data", $this->getSkinData()),
"Slim" => new ByteTag("Slim", $this->isSkinSlim() ? 1 : 0)
"Name" => new StringTag("Name", $this->getSkinName())
]);
}
}
@ -210,7 +210,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
if(!($this instanceof Player)){
$this->server->updatePlayerListData($this->getUniqueId(), $this->getId(), $this->getName(), $this->isSlim, $this->skin, [$player]);
$this->server->updatePlayerListData($this->getUniqueId(), $this->getId(), $this->getName(), $this->skinName, $this->skin, [$player]);
}
$pk = new AddPlayerPacket();