mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-14 01:04:12 +00:00
#750 Make sure recipes with NBT do not match items with no NBT
This commit is contained in:
1 parent
f6e3eb9335
commit
19a802fd68
2 files changed
+22
-2
No files matched your search
@@ -77,7 +77,17 @@ public class ShapedRecipeCustom implements IDescriptiveRecipe {
|
||||
|
||||
@Override
|
||||
public boolean matches(InventoryCrafting inventoryCrafting, World world) {
|
||||
return matches((IInventory) inventoryCrafting, world);
|
||||
if (!matches((IInventory) inventoryCrafting, world)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (preserveNBT) {
|
||||
if (RecipeUtil.getCraftingNbt(inventoryCrafting) == null) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean matches(IInventory inventoryCrafting, World world) {
|
||||
|
||||
@@ -73,7 +73,17 @@ public class ShapelessRecipeCustom implements IRecipe {
|
||||
}
|
||||
}
|
||||
|
||||
return arraylist.isEmpty();
|
||||
if (!arraylist.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (preservesNbt) {
|
||||
if (RecipeUtil.getCraftingNbt(inventoryCrafting) == null) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user