Tech Reborn

Tech Reborn

30M Downloads

Problem with recipes and OreDictionary

OneEyeMaker opened this issue ยท 3 comments

commented

Hello.
As JEI shows, most machines use OreDictionary entries as input.
But in fact it isn't so. If I understand correctly, recipes receive ItemStack as input and deduce OreDictionary from it (instead of receiving OreDictionary directly).
This leads to some problems:

  1. Machines ignore items from other mods with same OreDictionary ( #1394 )
  2. Machines use wrong OreDictionary name. There is simple example:
    if IC2 is loaded, mod registers recipe for compressor: lapis lazurite -> lapis plate. But lapis lazurite (item) in most modpacks has 3 OreDictionary names: dye, dyeBlue and gemLapis. And compressor uses first one, what allows craft Lapis plate from any dye!
  3. Problems with mod compatibility, especially, with CraftTweaker. For example:
    Method for adding CraftTweaker recipes for compressor in declaration has IIngredient argument. That allows to pass OreDictionary entry as argument.
    But inside body this method ignores any OreDcitionary entries and converts input to ItemStack.

Refactoring is needed to allow using OreDictionary entries directly in recipes.
I can help with this (Some time ago I worked on GregTech5U, so I have some experience).

commented

All the code for supplying inputs as strings is in and used by some of the newer recipes. The old recipes just need to be updated to use them. This will take some time.

commented

@OneEyeMaker Feel free to submit PR on point 3 ))

commented

ok should work just fine now when using ore dict entries.

My test script:

mods.techreborn.alloySmelter.addRecipe(<minecraft:gold_ingot>, <ore:ingotCopper>, <minecraft:diamond>, 20, 100);