File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -907,8 +907,18 @@ class CCraftDefManager: public IWritableCraftDefManager
907
907
<< " against " << def->dump() << std::endl;*/
908
908
909
909
if (def->check (input, gamedef)) {
910
+ // Check if the crafted node/item exists
911
+ CraftOutput out = def->getOutput (input, gamedef);
912
+ ItemStack is;
913
+ is.deSerialize (out.item , gamedef->idef ());
914
+ if (!is.isKnown (gamedef->idef ())) {
915
+ errorstream << " trying to craft nonexistant " << out.item << " , ignoring recipe" << std::endl;
916
+ continue ;
917
+ }
918
+
910
919
// Get output, then decrement input (if requested)
911
- output = def->getOutput (input, gamedef);
920
+ output = out;
921
+
912
922
if (decrementInput)
913
923
def->decrementInput (input, output_replacement, gamedef);
914
924
/* errorstream << "Check RETURNS TRUE" << std::endl;*/
You can’t perform that action at this time.
0 commit comments