Forgero - [Fabric]

Forgero - [Fabric]

85k Downloads

[Compatibility Issue] Forgero crafting patterns can transform materials in the Twilight Forest uncrafting table

Cart3r1234 opened this issue ยท 3 comments

commented

Due to the ability to select an output of recipes with multiple inputs in the Twilight Forest uncrafting table, by making a crafting pattern with a wooden tool, you can select the output of any other tool when uncrafting it. This means that with a large amount of xp, wood, and paper, you can turn wooden pickaxes into any other metal or gem.

There's a few ways that this could be solved:

  1. Make crafting patterns remember what tool they were crafted from. This would entail adding an extra tag to the crafting pattern, which would mean that identical patterns no longer stack, however it would prevent them from being uncrafted into materials they were not made with.

  2. Make crafting patterns a smithing table recipe. If you were to make the process of creating patterns rely on the smithing table (pickaxe/pickaxehead in slot 1 and paper in slot 2) rather than a shapeless crafting recipe, it would remove the potential uncrafting abuse without sacrificing the ability to stack identical patterns.

There's probably other ways this issue could be resolved, but those are just two that I could come up with off the top of my head.

Edit: It appears there's a tag called "twilight_forest:banned_uncrafting_ingredients" that forgero items could be added to.

commented

Ah this is interesting. I did not know Twilight forest had an uncrafting table. Thanks for bringing up the issue!

Ideally I would want to patch the issue so that it works with the uncrafting table, but I tested it and it seems like a big exploit. Forgero recipes rely heavily on nbt's, as well as custom recipe types to allow for custom amount of material to craft tools. The recipe situation in Forgero is not ideal atm and is subject to a lot of change. All recipes from forgero seems to be subject to this issue. Breaking down tools for materials in the uncrafting table is an option that should be supported in the uncrafting station, but breaking down schematics to get the original tool does not really make any sense. The only thing you should be able to get would be paper.

The proper solution would probably be to apply a patch to Twilight forest's uncrafting table to make it recognize Forgero tools and break them down by the data available in the nbt's. Forgero tools rely heavily on using tags for handles and bindings, to reduce the amount of recipes needed for one tool. This has a significant impact on loading times, as the recipe count runs into the hundreds of thousands if not using tags.

Changing the recipe to a smithing recipe is actually a good idea. It suits the style of Forgero imo. The only concern I have is added complexity. Having to use a smithing table to create schematics might be an unnecessary hassle for players.

For now I think I will add all Forgero resources to the banned tag. I am planning on creating a similar station to the uncrafting one for taking tools apart, it's still only in the planning phase but will be covered by #68. Maybe when I have created the code for my own station, I can patch it to the uncrafting station to make them behave similarly.

commented

Thanks for the reply, and I'm looking forward to seeing what's in store for future versions.

Breaking down tools for materials in the uncrafting table is an option that should be supported in the uncrafting station

Adding on to this issue, it seems that in some cases, using the uncrafting table to do this just fails, while still consuming experience (the uncrafting table requires levels to use, usually less than 5), If I can find a way to reliably reproduce it I'll add more info, but that was another oddity I ran into while testing out Forgero items in the uncrafting table.

It was able to successfully break down some tools, however others gave nothing back when uncrafted (and oddly didn't consume the tool in the process either), but consumed the required experience anyway.

In some cases, the resulting parts were completely scrambled - for example, a diamond handle, diamond binding, diamond head pickaxe uncrafted into a diorite handle, wooden binding, and diamond head. While TF lets you choose what input materials to uncraft to, it seems the handle/binding/head combinations it let me pick from were completely random.

commented

Yeah, Forgero's use of tags, container items (Variants of tools uses the same root Item, e.g. Sabers uses the sword item), NBT's for crafting and variable materials counts does not apply well to the uncrafting table. I tried testing some combinations as well, and like you said, the results were not consistent at all. This might also be caused by the same issue which causes #172. I will publish a fix as 0.9.2 soon.

I don't think there is a an easy fix for the uncrafting station as of now, disabling the functionality is probably the right choice as the results are way to inconsistent and bugged. I will have to look into the deconstruction of tools, as I really only have worked on ways of creation them. I think this issue will be way easier to solve properly once I get my own de-crafting station in working order.