Use -1 for anydamage and empty string for null NBT, closes #146

This commit is contained in:
Dylan K. Taylor
2016-12-21 14:45:34 +00:00
parent 300a3d5ccd
commit 5443b10257
7 changed files with 40 additions and 36 deletions

View File

@ -87,7 +87,7 @@ class ShapelessRecipe implements Recipe{
if($item->getCount() <= 0){
break;
}
if($ingredient->equals($item, $item->getDamage() === null ? false : true, $item->getCompoundTag() === null ? false : true)){
if($ingredient->equals($item, !$item->hasAnyDamageValue(), $item->hasCompoundTag())){
unset($this->ingredients[$index]);
$item->setCount($item->getCount() - 1);
}