Fixed craftin recipes with wildcard

This commit is contained in:
Shoghi Cervantes 2013-06-06 19:51:24 +02:00
parent 1179369666
commit c1f79fa2f8
2 changed files with 2 additions and 5 deletions

View File

@ -1479,7 +1479,7 @@ class Player{
$use = BlockAPI::getItem($slot->getID(), $slot->getMetadata(), $slot->count - $data["stack"]);
$this->craftingItems[$data["slot"]] = $use;
$craft = true;
}elseif($slot->count <= $data["stack"] and ($slot->getID() === AIR or $slot->getID() === $data["block"])){ //Crafting final
}elseif($slot->count <= $data["stack"] and ($slot->getID() === AIR or ($slot->getID() === $data["block"] and $slot->getMetadata() === $data["meta"]))){ //Crafting final
$craftItem = BlockAPI::getItem($data["block"], $data["meta"], $data["stack"] - $slot->count);
if(count($this->toCraft) === 0){
$this->toCraft[-1] = 0;
@ -1503,9 +1503,6 @@ class Player{
if($craft === true and count($this->craftingItems) > 0 and count($this->toCraft) > 0 and ($recipe = $this->craftItems($this->toCraft, $this->craftingItems, $this->toCraft[-1])) !== true){
if($recipe === false){
$this->dataPacket(MC_CONTAINER_CLOSE, array(
"windowid" => 0,
));
$this->sendInventory();
$this->toCraft = array();
}else{

View File

@ -268,7 +268,7 @@ class CraftingRecipes{
break;
}
$oitem = $recipeItems[$item[0]];
if(($oitem[1] != $item[1] and $item[2] !== false) or $oitem[2] != $item[2]){
if(($oitem[1] != $item[1] and $item[1] !== false) or $oitem[2] != $item[2]){
$continue = false;
break;
}