Modern Industrialization

Modern Industrialization

4M Downloads

Runtime recipes are not fully invariants

Orygeunik opened this issue · 6 comments

commented

I found one specific problem
Bronze tank have only one type of bronze plate for craft
image
But runtime type is correct (#c:bronze_plates)
image

For example static (like as \src\main\resources\data\modern_industrialization\easy_mode\recipes\steam_age\bronze\boiler_asbl.json) recipe work correct with invarian bronze plates
image
And uses same type (#c:bronze_plates)
image

In static recipes uses this tag

    "#": {
      "tag": "c:bronze_plates"
    },

I seen into source and found in StandardRecipes.java uses this code for generate runtime recipe

  new ShapedRecipeBuilder(ctx, TANK, 1, "tank", "###", "#G#", "###").addPart('#', PLATE).addInput('G', "minecraft:glass")
                    .exportToAssembler();

So i think the problem in is order of loading mods, when this method build recipe another mods have not loaded and registered their types yet

I have mods:

  • Modern Industrialization -0.5.8;
  • TechReborn 5.0.6-beta;
  • Industrial Revolution 1.10.0-alpha.12;
commented

@Azercoco what about lines:

new ShapedRecipeBuilder(ctx, TANK, 1, "tank", "###", "#G#", "###").addPart('#', LARGE_PLATE).addInput('G', "minecraft:glass")

new ShapedRecipeBuilder(ctx, BARREL, 1, "barrel", "###", "#b#", "###").addPart('#', LARGE_PLATE).addInput('b', "minecraft:barrel")

And
new ShapedRecipeBuilder(ctx, DRILL_HEAD, 1, "drill_head", "bcp", "GRc", "bGb").addPart('G', GEAR).addPart('b', BOLT)

And maybe

new ShapedRecipeBuilder(ctx, ORE, 1, "deeplsate_to_ore", " ", " x ", " ").addPart('x', ORE_DEEPLSATE);

here specially used .addPart?

commented
  • Large plate are not tagged by purpose (because MI is the only mod using them)
  • The gear should indeed be tagged (will do it in a couple of minutes)
  • There is no specific tag for the deepslate variant of ores. The ores and deeplsate are both tagged under #c:%s_ores. (Maybe we should add it but I don't see the purpose)
commented

@Azercoco @Technici4n big thank for you. You are very responsive and humanable!
Thanks for quick and comprehensive answers!

commented

The gear tag has been added ... but I don't think any mod add gears since astromine was discontinued.
Thank you too for reporting this issue. Finding forgotten tag can be a real pain.

commented

Actually you have correctly identified the issue, it should be addTaggedPart and not addPart.
The tag that you see is the tag of the item itself, not of the recipe. That's why you see it even though the recipe hard-codes our bronze plates.

commented

It has been fixed