mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Placing signs text
This commit is contained in:
parent
b697f1441e
commit
08b67428a0
5 changed files with 27 additions and 16 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue