mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Placing Signs
This commit is contained in:
parent
df46e241d3
commit
8a5708f47a
5 changed files with 45 additions and 1 deletions
|
|
@ -126,11 +126,18 @@ class BlockAPI{
|
|||
case 107:
|
||||
case 108:
|
||||
case 109:
|
||||
case 114:
|
||||
case 128:
|
||||
case 156:
|
||||
$drop[1] = 0;
|
||||
break;
|
||||
case 56:
|
||||
$drop = array(264, 0, 1);
|
||||
break;
|
||||
case 63:
|
||||
case 68:
|
||||
$drop = array(323, 0, 1);
|
||||
break;
|
||||
case 73:
|
||||
case 74:
|
||||
$drop = array(351, 4, mt_rand(4, 5));
|
||||
|
|
@ -619,6 +626,27 @@ class BlockAPI{
|
|||
return false;
|
||||
}
|
||||
break;
|
||||
case 323: //Signs
|
||||
$faces = array(
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 4,
|
||||
5 => 5,
|
||||
);
|
||||
if(!isset($faces[$data["face"]])){
|
||||
if($data["face"] === 1){
|
||||
$data["block"] = 63;
|
||||
$data["meta"] = 0;
|
||||
$this->server->api->tileentity->addSign($data["x"], $data["y"], $data["z"]);
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
$data["block"] = 68;
|
||||
$data["meta"] = $faces[$data["face"]];
|
||||
$this->server->api->tileentity->addSign($data["x"], $data["y"], $data["z"]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
$this->server->handle("player.block.place", $data);
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue