Jump to content

Recommended Posts

Posted

I have a set of recipes, crafting 9 tinydust into 1 largedust. There's about...16-18 of these for different ores (iron, gold, flour, etc). Not all of the ores exist in the game (e.g. copper) so I would prefer not registering those recipes (and their associated advancement).

 

In 1.10 and 1.11 I had this:

  Reveal hidden contents

 

Which set up an arbitrary ore for all the various things that could be done with it in my mod: smelting, grinding, sifting, packing, crafting...

Now with 1.12 and the json recipe system, how would I convert this? Is there an easier way than 16+ recipe json files?

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.

Posted (edited)

You will unfortunately need to create a recipe file for each recipe.

 

You can use the minecraft:item_exists condition to enable a recipe only when a specific Item has been registered.

Edited by Choonster
  • Like 1

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
  On 8/29/2017 at 11:43 AM, Choonster said:

You can use the minecraft:item_exists condition to enable a recipe only when a specific Item has been registered.

Expand  

Oh, that's good. Will that condition accept an oredict reference the way other Item specification does?

(This was the bigger deal, I can suffer 16 json files, but disabling them was more important).

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.

Posted
  On 8/29/2017 at 4:15 PM, Draco18s said:

Will that condition accept an oredict reference the way other Item specification does?

Expand  

Nope! It does not!

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.

Posted (edited)
  On 8/29/2017 at 4:15 PM, Draco18s said:

Oh, that's good. Will that condition accept an oredict reference the way other Item specification does?

(This was the bigger deal, I can suffer 16 json files, but disabling them was more important).

Expand  

 

No, it only accepts an Item registry name.

 

You could create your own condition for that, but ore dictionary registration is usually done in init; which is after recipes have been loaded and conditions tested.

 

If you use a forge:ore_dict ingredient with a non-existent ore name, the recipe will show in the recipe book and in JEI but won't be craftable. Attempting to fill the recipe using the recipe book will crash the game with an ArithmeticException: / by zero (I plan to report this to Forge). Attempting to fill the recipe using JEI will simply do nothing.

 

Edit: Reported the crash here.

Edited by Choonster

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
  On 8/29/2017 at 4:47 PM, Choonster said:

If you use a forge:ore_dict ingredient with a non-existent ore name, the recipe will show in the recipe book and in JEI but won't be craftable. Attempting to fill the recipe using the recipe book will crash the game with an ArithmeticException: / by zero (I plan to report this to Forge). Attempting to fill the recipe using JEI will simply do nothing.

Expand  

That's workable for now.

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.

Posted
  On 8/29/2017 at 4:47 PM, Choonster said:

but ore dictionary registration is usually done in init; which is after recipes have been loaded and conditions tested.

Expand  

 

I just asked about this and for 1.12.x, with the new registry events, the recommendation (as I suspected and confirmed by LexManos and discussion with Draco) is that you should now do ore dictionary registration in your item registry event handler after your item registration, as that fires before the recipe registry event.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted
  On 8/30/2017 at 4:11 AM, jabelar said:

I just asked about this and for 1.12.x, with the new registry events, the recommendation (as I suspected and confirmed by LexManos and discussion with Draco) is that you should now do ore dictionary registration in your item registry event handler after your item registration, as that fires before the recipe registry event.

Expand  

 

Indeed, I saw that some time after posting in this thread. That was news to me, since I'd previously thought that init was the de-facto standard phase for Ore Dictionary registration.

 

Even with this recommendation, I suspect a lot of mods are still doing things the old way (i.e. registering Ore Dictionary entries in init).

  • Like 2

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Fortunately (ish) those mods who register OreDict entries in init will find that their items cannot be used in other mod's recipes, so will be encouraged to move the registration.

Posted
  On 8/30/2017 at 12:30 PM, Alpvax said:

Fortunately (ish) those mods who register OreDict entries in init will find that their items cannot be used in other mod's recipes, so will be encouraged to move the registration.

Expand  

 

OreIngredients will match items registered for the ore name at any time, they don't take a snapshot of the Ore Dictionary when they're created.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
  On 8/29/2017 at 4:47 PM, Choonster said:

 

If you use a forge:ore_dict ingredient with a non-existent ore name, the recipe will show in the recipe book and in JEI but won't be craftable. Attempting to fill the recipe using the recipe book will crash the game with an ArithmeticException: / by zero (I plan to report this to Forge). Attempting to fill the recipe using JEI will simply do nothing.

Expand  

 

  On 8/30/2017 at 12:39 PM, Choonster said:

 

OreIngredients will match items registered for the ore name at any time, they don't take a snapshot of the Ore Dictionary when they're created.

Expand  

 

So this is actually just a  case of the reported issue. Other than that it all works correctly?

These two statements seem contradictory, I'm not sure what I'm missing here.

Posted
  On 8/30/2017 at 12:45 PM, Alpvax said:

So this is actually just a  case of the reported issue. Other than that it all works correctly?

These two statements seem contradictory, I'm not sure what I'm missing here.

Expand  

 

In my first post, I was talking about an ore name that never had any items registered for it. This will always return a zero-length array from Ingredient#getMatchingStacks.

 

If a mod were to register an item for that ore name at any point (i.e. even in init, postInit or when there's a world loaded), the OreIngredient would now match that item and include it in the array returned from Ingredient#getMatchingStacks. This is because OreIngredient stores a read-only view of the Ore Dictionary's item list for the specified ore name rather than creating a snapshot of the list at construction time.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Oh I see now. The issue is that Draco's recipes wouldn't be enabled if other mods registered OreDict entries too late.

Again, if that issue is discovered by users and reported correctly, the offending mods would be inclined to update.

Is it worth suggesting an oreDict version of the item_exists condition for inclusion in forge? (Although it wouldn't solve the problem, it would prevent the need for multiple modders to create their own.)

Posted
  On 8/31/2017 at 11:55 AM, Alpvax said:

Is it worth suggesting an oreDict version of the item_exists condition for inclusion in forge? (Although it wouldn't solve the problem, it would prevent the need for multiple modders to create their own.)

Expand  

I would love to have 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.

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

    • I have a similar issue any ideas what's the problem with this, I'm trying to run create in pojavlauncher but it refuses to startup each time I try.
    • Betafort's unparalleled expertise, unwavering ethical standards, and consistent track record have established him as a leading figure in the field. His swift and precise approach to retrieving lost digital funds, coupled with a steadfast commitment to client satisfaction, distinguishes him in the cybersecurity industry. He assisted me in reclaiming my lost digital currencies.  
    • Reinstalling did the trick, but everytime I put on Fullscreen lets the game crash and i have to reinstall it. Crash report is here: https://mclo.gs/zBEPCzW Thanks for helping.
    • помогите решить проблему отладочный.журнал [08.06.2025 12:35:55.181] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher запущен: args [--username, moom77, --version, 1.21.5-forge-55.0.22, --gameDir, C:\Users\USER\AppData\Roaming\.minecraft, --assetsDir, C:\Users\USER\AppData\Roaming\.minecraft\assets, --assetIndex, 24, --uuid, ea1fab2f798a4313b8385e168a3591df, --accessToken, **********, --clientId, ZmJjYTIyMmMtMDE3Yy00NzVmLTllMGYtMTllMzQwMmUwNTRi, --xuid, 2535432282491775, --userType, msa, --versionType, release, --quickPlayPath, C:\Users\USER\AppData\Roaming\.minecraft\quickPlay\java\1749375349970.json, --launchTarget, forge_client] [08.06.2025 12:35:55.187] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: JVM идентифицирована как Microsoft OpenJDK 64-Bit Server VM 21.0.7+6-LTS [08.06.2025 12:35:55.188] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: запуск ModLauncher 10.2.4: Java версии 21.0.7 от Microsoft; ОС Windows 11 arch amd64 версия 10.0 [08.06.2025 12:35:55.223] [main/DEBUG] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Найдены службы запуска [minecraft,forge_userdev_server_gametest,forge_dev_client,forge_userdev_data,forge_dev_server_gametest,forge_dev_client_data,forge_userdev_server,forge_client,forge_server,forge_userdev_client_data,forge_userdev_client,forge_dev_data,forge_dev,testharness,forge_userdev,forge_dev_server] [08.06.2025 12:35:55.239] [main/DEBUG] [cpw.mods.modlauncher.NameMappingServiceHandler/MODLAUNCHER]: Найдены службы именования: [srgtomcp] [08.06.2025 12:35:55.269] [main/DEBUG] [cpw.mods.modlauncher.LaunchPluginHandler/MODLAUNCHER]: Найдены плагины запуска: [mixin,eventbus,slf4jfixer,object_holder_definalize,runtime_enum_extender,capability_token_subclass,accesstransformer,runtimedistcleaner] [08.06.2025 12:35:55.281] [main/DEBUG] [cpw.mods.modlauncher.TransformationServicesHandler/MODLAUNCHER]: Обнаружение служб преобразования [08.06.2025 12:35:55.284] [main/DEBUG] [net.minecraftforge.fml.loading.FMLPaths/CORE]: Путь GAMEDIR - C:\Users\USER\AppData\Roaming\.minecraft [08.06.2025 12:35:55.285] [main/DEBUG] [net.minecraftforge.fml.loading.FMLPaths/CORE]: Путь MODSDIR - C:\Users\USER\AppData\Roaming\.minecraft\mods [08.06.2025 12:35:55.287] [main/DEBUG] [net.minecraftforge.fml.loading.FMLPaths/CORE]: Путь CONFIGDIR - C:\Users\USER\AppData\Roaming\.minecraft\config [08.06.2025 12:35:55.287] [main/DEBUG] [net.minecraftforge.fml.loading.FMLPaths/CORE]: Путь FMLCONFIG: C:\Users\USER\AppData\Roaming\.minecraft\config\fml.toml [08.06.2025 12:35:55.375] [main/INFO] [net.minecraftforge.fml.loading.ImmediateWindowHandler/]: Загрузка ImmediateWindowProvider fmlearlywindow [08.06.2025 12:35:55.674] [main/INFO] [EARLYDISPLAY/]: Попытка версии GL 4.6 [08июн.2025 12:35:55.674] [main/INFO] [EARLYDISPLAY/]: Если это единственное сообщение в конце вашего журнала перед сбоем, у вас, вероятно, проблема с драйвером. Возможные решения: A) Убедитесь, что Minecraft настроен на предпочтение высокопроизводительной графики в ОС и/или панели управления драйвером. B) Проверьте наличие обновлений драйверов на веб-сайте производителя видеокарты. C) Попробуйте переустановить графические драйверы. D) Если после всех вышеперечисленных действий проблема не устранена, обратитесь за помощью на форумы Forge или в Discord. Если игра успешно запустится, вы можете смело игнорировать это сообщение.     последний   [08.06.2025 12:35:55.181] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher запущен: args [--username, moom77, --version, 1.21.5-forge-55.0.22, --gameDir, C:\Users\USER\AppData\Roaming\.minecraft, --assetsDir, C:\Users\USER\AppData\Roaming\.minecraft\assets, --assetIndex, 24, --uuid, ea1fab2f798a4313b8385e168a3591df, --accessToken, **********, --clientId, ZmJjYTIyMmMtMDE3Yy00NzVmLTllMGYtMTllMzQwMmUwNTRi, --xuid, 2535432282491775, --userType, msa, --versionType, release, --quickPlayPath, C:\Users\USER\AppData\Roaming\.minecraft\quickPlay\java\1749375349970.json, --launchTarget, forge_client] [08.06.2025 12:35:55.187] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: JVM идентифицирована как Microsoft OpenJDK 64-Bit Server VM 21.0.7+6-LTS [08.06.2025 12:35:55.188] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: запуск ModLauncher 10.2.4: Java версии 21.0.7 от Microsoft; ОС Windows 11 arch amd64 version 10.0 [08.06.2025 12:35:55.375] [main/INFO] [net.minecraftforge.fml.loading.ImmediateWindowHandler/]: Загрузка ImmediateWindowProvider fmlearlywindow [08.06.2025 12:35:55.674] [main/INFO] [EARLYDISPLAY/]: Попытка GL версии 4.6 [08.06.2025 12:35:55.674] [main/INFO] [EARLYDISPLAY/]: Если это единственное сообщение в нижней части журнала перед сбоем, у вас, вероятно, проблема с драйвером. Возможные решения: A) Убедитесь, что Minecraft настроен на предпочтение высокопроизводительной графики в ОС и/или панели управления драйвером. B) Проверьте наличие обновлений драйверов на веб-сайте производителя видеокарты. C) Попробуйте переустановить графические драйверы. D) Если после всех вышеперечисленных действий проблема не устранена, обратитесь за помощью на форумы Forge или в Discord. Если игра успешно запустится, вы можете смело игнорировать это сообщение.  
    • Add crash-reports with sites like https://mclo.gs/   Looks like biomeswevegone and Actual_mod_AerluneRPG0.0.4.jar are conflicting - make a test without Actual_mod_AerluneRPG0.0.4.jar
  • Topics

×
×
  • Create New...

Important Information

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