How can I make a gui that uses json recipes instead of procedures?

Started by readf0x on

Topic category: Help with modding (Java Edition)

Last seen on 21:13, 17. Dec 2021
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I make a gui that uses json recipes instead of procedures?

I'm trying to make a gui that would create it's own recipe type and use vanilla style recipes instead of creating a procedure that contains each individual recipe inside it.
For example, I could make a recipe like:

{
  "type": "mod:custom_recipe_type",
  "base": {
    "item": "mod:input_1"
  },
  "addition": {
    "item": "mod:input_2"
  },
  "result": {
    "item": "mod:output"
  }
}

It's essentially just a smithing table, but I won't use a regular smithing table for balance reasons. (The output items will be cheap and powerful, so the block to make them has to be very expensive) Does anyone know a way to do this?

Last seen on 23:21, 17. Jun 2022
Joined Apr 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes, there is a way to make…
Mon, 11/22/2021 - 22:14

Yes, there is a way to make custom JSON recipes, but only with code and you can’t use procedures for this.

If you you want to try and code it: https://forge.gemwire.uk/wiki/Custom_Recipes/1.16

I can also link an example from my mod if you want.

Last seen on 21:13, 17. Dec 2021
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'd love an example, Mr…
Mon, 11/22/2021 - 23:14

I'd love an example, Mr. Frostygames!
I'm using MCreator in the first place because I hate java. I know it's simple if you learn it, but I don't have 2 years to spare on a project I'm not going to look at ever again once I finish it lol

Last seen on 23:21, 17. Jun 2022
Joined Apr 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Here: https://github.com…
Tue, 11/23/2021 - 08:04

Here: https://github.com/Frostygames0/Elemental-Amulets/tree/master/src/main/java/frostygames0/elementalamulets/recipes.

This package contains everything you need to create a recipe. Also look into Elemental Combinator Tile class for implentation of crafting table and ModRecipes to register them.  

You can also look inside Minecraft's code to see how they do it.

And you should really try to learn Java! Two weeks of practice and I wrote a mod.

Last seen on 15:49, 18. Feb 2024
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can download the plugin…
Tue, 11/23/2021 - 08:54

You can download the plugin File Manager by @Goldorion. It can read JSON files.