mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 18:59:00 +00:00
Fixed crafting
This commit is contained in:
parent
2ea81710ad
commit
58709293cf
@ -2636,15 +2636,11 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
for($y = 0; $y < 3; ++$y){
|
for($y = 0; $y < 3; ++$y){
|
||||||
$item = $packet->input[$y * 3 + $x];
|
$item = $packet->input[$y * 3 + $x];
|
||||||
$ingredient = $recipe->getIngredient($x, $y);
|
$ingredient = $recipe->getIngredient($x, $y);
|
||||||
if($item->getCount() > 0 and $item->getId() > 0){
|
if($item->getCount() > 0){
|
||||||
if($ingredient === null or !$ingredient->deepEquals($item, $ingredient->getDamage() !== null, $ingredient->getCompoundTag() !== null)){
|
if($ingredient === null or !$ingredient->deepEquals($item, $ingredient->getDamage() !== null, $ingredient->getCompoundTag() !== null)){
|
||||||
$canCraft = false;
|
$canCraft = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}elseif($ingredient !== null and $ingredient->getId() !== 0){
|
|
||||||
$canCraft = false;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user