File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -907,8 +907,19 @@ 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
+ infostream << " trying to craft non-existent "
916
+ << out.item << " , ignoring recipe" << std::endl;
917
+ continue ;
918
+ }
919
+
910
920
// Get output, then decrement input (if requested)
911
- output = def->getOutput (input, gamedef);
921
+ output = out;
922
+
912
923
if (decrementInput)
913
924
def->decrementInput (input, output_replacement, gamedef);
914
925
/* errorstream << "Check RETURNS TRUE" << std::endl;*/
You can’t perform that action at this time.
0 commit comments