Closed Technici4n closed 3 years ago
Update: after discussion with sharrte, you should try to return the best guess for the output, at least when there is only one output. I suggest returning the first stack. That will allow setting patterns from AE2.
Update: you should include the count in the return
of getPreviewStacks
too. To reproduce and test all of this, install TR + REI + AE2. If everything works as intended, it should be possible to shift-click the bronze ingot alloy smelter recipe into the pattern.
https://github.com/TechReborn/RebornCore/blob/69d89bc7385dcfafb4f1b4f164f8cade9bd3f9fc/src/main/java/reborncore/common/crafting/RebornRecipe.java#L226
AE2 calls this function when trying to set a pattern from REI, and it crashes dedicated servers. Would it be possible to soft-fail by returning
ItemStack.EMPTY
instead?