mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-30 23:29:54 +00:00
Fix crafting not taking item from inventory
This commit is contained in:
parent
c7c78b1159
commit
d5f3c19054
@ -52,7 +52,7 @@ class CraftingManager{
|
||||
private static $RECIPE_COUNT = 0;
|
||||
|
||||
public function __construct(){
|
||||
// load recipes from src/pocketmine/recipes.json
|
||||
// load recipes from src/pocketmine/recipes.json
|
||||
$recipes = new Config(Server::getInstance()->getFilePath() . "src/pocketmine/resources/recipes.json", Config::JSON, []);
|
||||
|
||||
MainLogger::getLogger()->Info("Loading recipes...");
|
||||
@ -88,7 +88,7 @@ class CraftingManager{
|
||||
case 2:
|
||||
$result = $recipe["Result"];
|
||||
$resultItem = Item::get($result["ID"], $result["Damage"], $result["Count"]);
|
||||
$this->registerRecipe(new FurnaceRecipe($resultItem, Item::get($recipe["Ingredients"], 0,1)));
|
||||
$this->registerRecipe(new FurnaceRecipe($resultItem, Item::get($recipe["Ingredients"], 0, 1)));
|
||||
break;
|
||||
case 3:
|
||||
$result = $recipe["Result"];
|
||||
|
@ -1525,7 +1525,7 @@ class Item{
|
||||
}
|
||||
|
||||
public final function deepEquals(Item $item, bool $checkDamage = true, bool $checkCompound = true) : bool{
|
||||
if($item->equals($item, $checkDamage, $checkCompound)){
|
||||
if($this->equals($item, $checkDamage, $checkCompound)){
|
||||
return true;
|
||||
}elseif($item->hasCompoundTag() or $this->hasCompoundTag()){
|
||||
return NBT::matchTree($this->getNamedTag(), $item->getNamedTag());
|
||||
|
Loading…
x
Reference in New Issue
Block a user