Jump to content

Way to swap two crafting recipes?


Thoride

Recommended Posts

Hello all, as the title suggests I'm looking for a way to grab two random crafting recipes and then swap them such that crafting the first thing actually outputs the second thing. Is this possible? How difficult is it and if it is possible how would I go about doing it. I think I might have a way to grab a random IRecipe (Can share if needed), I'm more just looking to how I would swap a recipe. Thanks!

Link to comment
Share on other sites

3 minutes ago, diesieben07 said:

When is decided which two recipes are swapped? Every time you load a world? What about servers, does every player get a different pair of swapped recipes? Is it per server?

It would be inside a function that is called at random time X that also passes through the player. So ideally on a server it would be per player instead of per server unless per server is easier to do?

Link to comment
Share on other sites

2 minutes ago, diesieben07 said:

Looking into this, this probably is not possible, because recipes often look at the actual crafting grid to determine their output. If you ask a recipe that doesn't actually match to produce its output it might not output anything or just crash, because the crafting grid doesn't actually match.

Leaving that aside, there is no (good) way to modify the loaded recipes at runtime. Even if you would hack into the RecipeManager and just modify the list, you'd probably have to deal with all kinds of things that are no longer working properly, from the fact that the client now no longer has the correct set of recipes (pretty easy to fix I guess) to something like JEI probably being broken now.

 

Doing it per player would be even more crazy.

Appreciate the feedback, i'd seen this video by ssundee with a modpack that had a similar idea so I assumed it was possible. Perhaps because it was older? Thanks anyways!

 

Link to comment
Share on other sites

That was posted in May of 2017, so MC 1.10 most likely.

Recipes were much more...run-time accessible at the time. How that particular mod did things I can't say (I can't even find the mod description, just a link to the twitter of the guy that made it).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.