Placing signs text

This commit is contained in:
Shoghi Cervantes Pueyo 2013-01-30 17:07:43 +01:00
parent b697f1441e
commit 08b67428a0
5 changed files with 27 additions and 16 deletions

View file

@ -378,7 +378,6 @@ class Player{
break;
case 0x03:
case 0xa9:
break;
case MC_DISCONNECT:
@ -620,6 +619,21 @@ class Player{
$this->server->api->block->drop($this->entity->x, $this->entity->y, $this->entity->z, $data["block"], $data["meta"], $data["stack"]);
}
break;
case MC_SIGN_UPDATE:
$t = $this->server->api->tileentity->get($data["x"], $data["y"], $data["z"]);
if(($t[0] instanceof TileEntity) and $t[0]->class === TILE_SIGN){
$t = $t[0];
if($t->data["creator"] !== $this->username){
$t->spawn($this);
}else{
$t->data["Text1"] = $data["line0"];
$t->data["Text2"] = $data["line1"];
$t->data["Text3"] = $data["line2"];
$t->data["Text4"] = $data["line3"];
$this->server->api->tileentity->spawnToAll($t);
}
}
break;
default:
console("[DEBUG] Unhandled 0x".dechex($data["id"])." Data Packet for Client ID ".$this->clientID.": ".print_r($data, true), true, true, 2);
break;