Skip to content

Commit

Permalink
Fixed ghost armor
Browse files Browse the repository at this point in the history
  • Loading branch information
shoghicp committed Jul 4, 2013
1 parent 5237867 commit b776d9d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Player.php
Original file line number Diff line number Diff line change
Expand Up @@ -1347,11 +1347,12 @@ public function handleDataPacket($pid, $data){
}
$this->craftingItems = array();
$this->toCraft = array();

$data["eid"] = $this->eid;
$data["player"] = $this;
for($i = 0; $i < 4; ++$i){
$s = $data["slot$i"];
if($s === 0){
if($s === 0 or $s === 255){
$s = BlockAPI::getItem(AIR, 0, 0);
}else{
$s = BlockAPI::getItem($s + 256, 0, 1);
Expand All @@ -1368,7 +1369,7 @@ public function handleDataPacket($pid, $data){
}

}
$this->server->handle("player.armor", $data);
$this->sendArmor();
if($this->entity->inAction === true){
$this->entity->inAction = false;
$this->entity->updateMetadata();
Expand Down

0 comments on commit b776d9d

Please sign in to comment.