mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Inventory saving (without checks)
This commit is contained in:
parent
e4bf449198
commit
7723e3784f
4 changed files with 139 additions and 3 deletions
|
|
@ -250,6 +250,7 @@ class BlockAPI{
|
|||
if($data["face"] < 0 or $data["face"] > 5){
|
||||
return false;
|
||||
}
|
||||
$data["original"] = array($data["block"], $data["meta"]);
|
||||
$target = $this->server->api->level->getBlock($data["x"], $data["y"], $data["z"]);
|
||||
if($target[0] === 0){ //If no block exists
|
||||
$this->cancelAction($target);
|
||||
|
|
@ -296,7 +297,7 @@ class BlockAPI{
|
|||
if($data["block"] === 292){ //Hoe
|
||||
$data["block"] = 60;
|
||||
$data["meta"] = 0;
|
||||
$this->server->handle("player.block.place", $data);
|
||||
$this->server->handle("player.block.update", $data);
|
||||
$cancelPlace = true;
|
||||
}
|
||||
case 59:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue