Tinkers Construct

Tinkers Construct

160M Downloads

[Suggestion] Melt obsidian dusts in the smeltery (mod compatibility)

MarioSMB opened this issue ยท 3 comments

commented

Describe the solution you'd like
Several tech mods add a dust form of obsidian obtained via crushing, it would be nice to be able to melt these dusts in the smeltery

Additional context
Any items with the forge:dusts/obsidian tag would be melted into 250mb of molten obsidian

Versions:

  • Minecraft: 1.16.5
  • Forge: 36.1.4
  • Mantle: 1.6.92
  • Tinkers Construct: 3.0.3.136

Confirm below that this enhancement is not covered on the roadmap or "Whats New?"
Confirmed

commented

Added in 3.0.3.152

commented

Generally speaking, dusts seem to be equivalent to somewhere between 1 and 4 units of whatever material they are a dust of. The exact number varies from one mod to another, so I'm not fully settled on using the ratio of 4 dust<->1 obsidian.
In any case, if we go with that ratio, the JSON we'd want to generate for this should end up looking something like the following:

{
  "type": "tconstruct:melting",
  "conditions": [
    {
      "value": {
        "tag": "forge:dusts/obsidian",
        "type": "forge:tag_empty"
      },
      "type": "forge:not"
    }
  ],
  "ingredient": {
    "tag": "forge:dusts/obsidian"
  },
  "result": {
    "fluid": "tconstruct:molten_obsidian",
    "amount": 250
  },
  "temperature": 1000,
  "time": 66
}

This could end up in a new file at src/generated/resources/data/tconstruct/recipes/smeltery/melting/obsidian_dust.json

I believe we could generate such a file by adding the following snippet into src/main/java/slimeknights/tconstruct/smeltery/data/SmelteryRecipeProvider.java:addMeltingRecipes, probably somewhere next to the existing obsidian-related melting recipes.

    MeltingRecipeBuilder.melting(Ingredient.fromTag(getTag("forge", "dusts/obsidian")), TinkerFluids.moltenObsidian.get(), MaterialValues.SLIMEBALL, 0.5f)
	                    .build(withCondition(consumer, tagCondition("dusts/obsidian")), location(folder + "obsidian_dust"));

If this is something the main developers agree on implementing, and that snippet looks like it should do the trick, I'd be happy to throw it into a quick PR.

Even if it doesn't end up included in the mod, you should still be able to use the JSON snippet from above to add the recipe yourself with a custom datapack.

commented

We have a helper function to generate such recipes (used for mod compat metals). Probably easier if I add it directly as it would take as much time to implement as to review a PR