mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 12:39:43 +00:00
fixed dyes
This commit is contained in:
parent
cca35d843f
commit
fba7a5d66e
1 changed files with 8 additions and 2 deletions
|
|
@ -227,7 +227,14 @@ class CraftingRecipes{
|
||||||
$id = $id[0];
|
$id = $id[0];
|
||||||
|
|
||||||
$it = BlockAPI::fromString($id);
|
$it = BlockAPI::fromString($id);
|
||||||
$recipeItems[$it->getID()] = array($it->getID(), $meta === "?" ? false:intval($meta)&0xFFFF, intval($item[1]));
|
if(!isset($recipeItems[$it->getID()])){
|
||||||
|
$recipeItems[$it->getID()] = array($it->getID(), $meta === "?" ? false:intval($meta)&0xFFFF, intval($item[1]));
|
||||||
|
}else{
|
||||||
|
if($it->getMetadata() !== $recipeItems[$it->getID()][1]){
|
||||||
|
$recipeItems[$it->getID()][1] = false;
|
||||||
|
}
|
||||||
|
$recipeItems[$it->getID()][2] += $it->count;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ksort($recipeItems);
|
ksort($recipeItems);
|
||||||
$item = explode("x", $recipe[1]);
|
$item = explode("x", $recipe[1]);
|
||||||
|
|
@ -285,7 +292,6 @@ class CraftingRecipes{
|
||||||
}
|
}
|
||||||
$recipeString = substr($recipeString, 0, -1)."=>".$craftItem[0]."x".$craftItem[2];
|
$recipeString = substr($recipeString, 0, -1)."=>".$craftItem[0]."x".$craftItem[2];
|
||||||
$server = ServerAPI::request();
|
$server = ServerAPI::request();
|
||||||
|
|
||||||
$result = $server->query("SELECT id FROM recipes WHERE type == ".$type." AND recipe == '".$recipeString."';");
|
$result = $server->query("SELECT id FROM recipes WHERE type == ".$type." AND recipe == '".$recipeString."';");
|
||||||
if($result instanceof SQLite3Result){
|
if($result instanceof SQLite3Result){
|
||||||
$continue = true;
|
$continue = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue