You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (resultinstanceofBoolean) return (Boolean) result;
36
36
else {
37
37
logger.error("Could not check match for custom shaped recipe {}, returning standard match: function 'matches' must return a boolean, but returned {} instead", getId(), result.getClass().getName());
@@ -49,7 +49,8 @@ public ItemStack craft(CraftingInventory inv) {
if (resultinstanceofBoolean) return (Boolean) result;
36
36
else {
37
37
logger.error("Could not check match for custom shapeless recipe {}, returning standard match: function 'matches' must return a boolean, but returned {} instead", getId(), result.getClass().getName());
@@ -49,10 +49,10 @@ public ItemStack craft(CraftingInventory inv) {
if (resultinstanceofBoolean) return (Boolean) result;
42
43
else {
43
-
logger.error("Could not check match for custom special crafting recipe {}, returning false: function 'matches' must returna boolean, but returned {} instead", getId(), result.getClass().getName());
44
+
logger.error("Could not check match for custom special crafting recipe {}, returning false: function 'matches' must return a boolean, but returned {} instead", getId(), result.getClass().getName());
44
45
returnfalse;
45
46
}
46
47
} catch (Exceptione) {
47
48
logger.error("Could not check match for custom special crafting recipe {}, returning false: {}", getId(), e.getMessage());
49
+
e.printStackTrace();
48
50
}
49
51
returnfalse;
50
52
}
@@ -53,15 +55,15 @@ public boolean matches(CraftingInventory inv, World world) {
logger.error("Could not get preview output for custom special crafting recipe %s, returning empty stack: function 'preview' must not return null", getId());
60
+
logger.error("Could not get preview output for custom special crafting recipe {}, returning empty stack: function 'preview' must not return null", getId());
59
61
returnItemStack.EMPTY;
60
62
} else {
61
63
returnRecipeParser.processItemStack(result);
62
64
}
63
65
} catch (Exceptione) {
64
-
logger.error("Could not get preview output for custom special crafting recipe %s, returning empty: %s", getId(), e.getMessage());
66
+
logger.error("Could not get preview output for custom special crafting recipe {}, returning empty stack: {}", getId(), e.getMessage());
65
67
returnItemStack.EMPTY;
66
68
}
67
69
}
@@ -71,22 +73,38 @@ public boolean fits(int width, int height) {
71
73
returntrue; //this doesn't matter, since it's a special crafting recipe
72
74
}
73
75
74
-
//TODO: make sure this is only called on server?
76
+
//this *should* only be called on server, from what I can tell
0 commit comments