mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
better craft checking
This commit is contained in:
parent
75a6b66d29
commit
b0bad174e0
2 changed files with 42 additions and 10 deletions
|
|
@ -2803,7 +2803,13 @@ class Player{
|
|||
|
||||
|
||||
$cc = CraftingRecipes::canCraft($results, $ingridients, $this->craftingType);
|
||||
if(!is_array($cc)) return;
|
||||
if(!is_array($cc)){
|
||||
if(!$cc){
|
||||
$this->toCraft = [];
|
||||
$this->craftingItems = [];
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if($this->server->api->dhandle("player.craft", ["player" => $this, "ingridients" => $this->craftingItems, "results" => $this->toCraft, "type" => $this->craftingType]) === false){
|
||||
$this->toCraft = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue