Jump to content

Change Recipes with config


RaphGamingz

Recommended Posts

5 hours ago, RaphGamingz said:

how do i change recipes to make it harder if the config is set to true. 

You'll need to have a custom IRecipeSerializer(1.14) make sure to register it via the forge registry system.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

9 hours ago, RaphGamingz said:

so a class that implements IRecipeSerializer

...which needs to return an instance of a class that extends IRecipe<?> from one of its methods.

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

8 hours ago, RaphGamingz said:

How do i do the recipe. they are loaded with a json file automatically. Do i write a condition in the file

You write an IRecipeSerializer you can base it off of vanilla's crafting one(s). Then you also need a IRecipe implementation that actually checks the config data for your mod when determining the result. So the IRecipeSerializer will do everything exactly the same as the vanilla one except it will load an extra piece from the json telling you which config data you need to access(your choice on how to implement that) and it needs to return a instance of your IRecipe implementation.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

On 10/25/2019 at 5:12 AM, RaphGamingz said:

How do i do the recipe. they are loaded with a json file automatically. Do i write a condition in the file

My solution is different from what the others are talking about. See Jabelar's tutorial on conditional recipes and follow the link he gives to Choonster's TestMod3 example. It's all laid out there. The basic idea is that you create a class that implements IConditionFactory to return true or false based on some value in your config file. Then you create a _factories file in your recipes folder. Then you add the condition into the recipe's json file.

This is all for 1.12.2. I haven't looked at newer versions and don't know if it works the same. What version are you working with?

Link to comment
Share on other sites

16 hours ago, Daeruin said:

This is all for 1.12.2. I haven't looked at newer versions and don't know if it works the same.

They are slightly different. There is no IConditionFactory as a matter of fact no need for one. You create an IRecipeSerializer(This is an IForgeRegistry thing) and return whatever IRecipe implementation you want there based on whatever you want in the JSON recipe.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

  • 1 month later...
On 10/27/2019 at 2:15 PM, Daeruin said:

My solution is different from what the others are talking about. See Jabelar's tutorial on conditional recipes and follow the link he gives to Choonster's TestMod3 example. It's all laid out there. The basic idea is that you create a class that implements IConditionFactory to return true or false based on some value in your config file. Then you create a _factories file in your recipes folder. Then you add the condition into the recipe's json file.

This is all for 1.12.2. I haven't looked at newer versions and don't know if it works the same. What version are you working with?

1.14

 

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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Akun Pro Kamboja adalah pilihan terbaik bagi Anda yang mencari pengalaman bermain slot Maxwin dengan transaksi mudah menggunakan Bank Lampung. Berikut adalah beberapa alasan mengapa Anda harus memilih Akun Pro Kamboja: Slot Maxwin Terbaik Kami menyajikan koleksi slot Maxwin terbaik yang menawarkan kesenangan bermain dan peluang kemenangan besar. Dengan fitur-fitur unggulan dan tema-tema menarik, setiap putaran permainan akan memberikan Anda pengalaman yang tak terlupakan. Transaksi Mudah dengan Bank Lampung Kami menyediakan layanan transaksi mudah melalui Bank Lampung untuk kenyamanan dan keamanan Anda. Dengan proses yang cepat dan efisien, Anda dapat melakukan deposit dan penarikan dana dengan lancar dan tanpa hambatan. Anti Rungkat Akun Pro Kamboja memberikan jaminan "anti rungkat" kepada para pemainnya. Dengan fitur ini, Anda dapat merasakan sensasi bermain dengan percaya diri, karena kami memastikan pengalaman bermain yang adil dan menyenangkan bagi semua pemain.  
    • BINGO188: Destinasi Terbaik untuk Pengalaman Slot yang Terjamin Selamat datang di BINGO188, tempat terbaik bagi para pecinta slot yang mencari pengalaman bermain yang terjamin dan penuh kemenangan. Di sini, kami menawarkan fitur unggulan yang dirancang untuk memastikan kepuasan dan keamanan Anda. Situs Slot Garansi Kekalahan 100 Kami memahami bahwa kadang-kadang kekalahan adalah bagian dari permainan. Namun, di BINGO188, kami memberikan jaminan keamanan dengan fitur garansi kekalahan 100. Jika Anda mengalami kekalahan, kami akan mengembalikan saldo Anda secara penuh. Kemenangan atau uang kembali, kami memastikan Anda tetap merasa aman dan nyaman. Bebas IP Tanpa TO Nikmati kebebasan bermain tanpa batasan IP dan tanpa harus khawatir tentang TO (Turn Over) di BINGO188. Fokuslah pada permainan Anda dan rasakan sensasi kemenangan tanpa hambatan. Server Thailand Paling Gacor Hari Ini Bergabunglah dengan server terbaik di Thailand hanya di BINGO188! Dengan tingkat kemenangan yang tinggi dan pengalaman bermain yang lancar, server kami dijamin akan memberikan Anda pengalaman slot yang tak tertandingi. Kesimpulan BINGO188 adalah pilihan terbaik bagi Anda yang menginginkan pengalaman bermain slot yang terjamin dan penuh kemenangan. Dengan fitur situs slot garansi kekalahan 100, bebas IP tanpa TO, dan server Thailand paling gacor hari ini, kami siap memberikan Anda pengalaman bermain yang aman, nyaman, dan menguntungkan. Bergabunglah sekarang dan mulailah petualangan slot Anda di BINGO188!
    • Mengapa Memilih AlibabaSlot? AlibabaSlot adalah pilihan terbaik bagi Anda yang mencari slot gacor dari Pgsoft dengan transaksi mudah menggunakan Bank Panin. Berikut adalah beberapa alasan mengapa Anda harus memilih AlibabaSlot: Slot Gacor dari Pgsoft Kami menyajikan koleksi slot gacor terbaik dari Pgsoft. Dengan fitur-fitur unggulan dan peluang kemenangan yang tinggi, setiap putaran permainan akan memberikan Anda kesenangan dan keuntungan yang maksimal. Transaksi Mudah dengan Bank Panin Kami menyediakan layanan transaksi mudah melalui Bank Panin untuk kenyamanan dan keamanan Anda. Dengan proses yang cepat dan efisien, Anda dapat melakukan deposit dan penarikan dana dengan lancar dan tanpa masalah.  
    • Delete the jei-server.toml file in your config folder and test it again
    • java.util.ConcurrentModificationException at java.base/java.util.HashMap.computeIfAbsent(Unknown Source) at Genesis//com.moonsworth.lunar. ... Looks like an issue with the Launcher - Make a test with another Launcher like MultiMC, AT Launcher or Technic Launcher or try the original one
  • Topics

×
×
  • Create New...

Important Information

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