TechReborn / RebornCore

Reborn Core is a library used for many of the Tech Reborn team's mods, including Tech Reborn, Quantum Storage, Fluxed Redstone, Hardcore Map Reset, and many more.
MIT License
44 stars 51 forks source link

AE2 crash #168

Closed Technici4n closed 3 years ago

Technici4n commented 3 years ago

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?

Technici4n commented 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.

Technici4n commented 3 years ago

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.