Fixed ghost armor

This commit is contained in:
Shoghi Cervantes 2013-07-04 22:01:28 +02:00
parent 5237867319
commit b776d9d5fc

View File

@ -1347,11 +1347,12 @@ class Player{
} }
$this->craftingItems = array(); $this->craftingItems = array();
$this->toCraft = array(); $this->toCraft = array();
$data["eid"] = $this->eid; $data["eid"] = $this->eid;
$data["player"] = $this; $data["player"] = $this;
for($i = 0; $i < 4; ++$i){ for($i = 0; $i < 4; ++$i){
$s = $data["slot$i"]; $s = $data["slot$i"];
if($s === 0){ if($s === 0 or $s === 255){
$s = BlockAPI::getItem(AIR, 0, 0); $s = BlockAPI::getItem(AIR, 0, 0);
}else{ }else{
$s = BlockAPI::getItem($s + 256, 0, 1); $s = BlockAPI::getItem($s + 256, 0, 1);
@ -1368,7 +1369,7 @@ class Player{
} }
} }
$this->server->handle("player.armor", $data); $this->sendArmor();
if($this->entity->inAction === true){ if($this->entity->inAction === true){
$this->entity->inAction = false; $this->entity->inAction = false;
$this->entity->updateMetadata(); $this->entity->updateMetadata();