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
oop, seems like a minor omission -- after the level.isClientSide check, you should be able to cast the level to a ServerLevel (directly or via instanceof pattern matching, whichever you feel better about) and then call getRecipeManager
The text was updated successfully, but these errors were encountered:
Note that getRecipeManager() is on Level, not ServerLevel. However, the client-server handling in this example is not the best. Cancelling the event only on the server and letting it run on the client can cause all kinds of desyncs, depending on what happens next.
In the code sample under https://docs.neoforged.net/docs/resources/server/recipes/#the-crafting-mechanic, the variable
recipes
is used without showing how to get it.I asked on the Discord, got this response
The text was updated successfully, but these errors were encountered: