ldtteam / minecolonies-features

This is a repo only to discuss minecolonies features (requested and planned)
10 stars 3 forks source link

Allow Crafter Recipes to also use tags #629

Open Guinaro opened 2 years ago

Guinaro commented 2 years ago

Prerequisites

Context

Is your feature request related to a problem?

I am developing my own mod pack and I'm enforcing the use of Colonist crafters to obtain certain items. So I create a lot of my own Crafter Recipes in my datapack. Crafters can take original crafting table recipes which use Tags in them e.g. forge:chests. However I cannot specify that those recipes should only be able to be crafted from and/or to a certain level. Nor can I mark those recipes as no longer craftable by the user but only be a certain colonist crafter.

So when making my own recipes I also cannot use tags so I am forced to use e.g. minecraft:chest instead. And either I create a recipe for each chest or I need to make a conversion recipe for those items. However that isn't a good options if you are e.g. working with food items, where for instance you want to use 1 out of x root vegetables, and 1 out of x leafy vegetables. You simply cannot create so many recipes to allow for each combination. It would also clutter the JEI overview with way to many recipes and all that to craft the same item.

Enhancement or Change description

Please allow use to use Tags as input as well. Either with a simple fix like adding a # or using "tag" instead of "item". I prefer the # as I think it will be simpler in usage. And doesn't alter the json itself.

Notes or related things

Another extra way could be to allow us datapack functionality to specify a specific recipe to a certain crafter from and/or to a certain level. With the extra option to mark those recipes as crafter recipes only, so no longer user craftable. However this would probably still mean allowing recipes to use tags in some form. This however would make recipes a bit easier as you could simply use: recipe name, level from, optional: level to, crafter only instead of needing to recreate the full recipe again in your datapack.


Viewers

uecasm commented 2 years ago

Tags are not valid as input for custom recipes because the recipes are pre-learned by the crafter, so the player has no opportunity to choose which of the items in the tag to actually use (unlike when manually crafting).

So if you want a general recipe, make a vanilla recipe with a tag and the player can craft it manually or choose what items they want a colony crafter to use. Or if you want a colony-only recipe, make a custom recipe and then you have to pick specific items.

Guinaro commented 2 years ago

All the recipes marked with tags as crafter_product or crafter_ingredient are also prelearned recipes. Why can they use tags then? Lets say I want a carpenter to only be able to create a minecraft chest from level 3 onwards. I have to create 43 046 721 (9 types of planks using 8 different planks) recipes to allow to replicate the functionality that the standard recipe allows to be used from level 1. Which is absurd. Let alone if you add a mod like biomes of plenty which ups the number of planks to 21 or so. Yielding a whopping 37 822 859 361 (21^8) number of recipes to obtain equal functionality with the standard recipes using "minecraft:planks" instead. Yes! That is the power that using tags instead of fixed items provides.

I can understand to not provide this functionality with recipes that you can teach a crafter. As GUI wise it would be much harder to obtain a decent working system. Aswell as mostly you can tailor the recipes to e.g. use the wood your forester provides. But the prelearned ones, certainly can benefit from using tags. Since as a modpack maker you do not know which wood your modpack users will want to use. And especially if recipes are not user craftable.

uecasm commented 2 years ago

The learnable recipes can use tags because the user has to explicitly choose one single item from the tag to learn as a concrete recipe (or teach the recipe multiple times with different items). The pre-learned recipes have no such opportunity.

There's some more discussion on the complications of "just supporting tags" here.

Having a way to limit particular learnable recipes to particular levels is a different feature request, but one that would actually be easier than supporting tags (though would likely be a lot of work for modpack authors to use).

Guinaro commented 2 years ago

OK. I'm going to leave this request up. With the understanding that it is highly likely that it won't be execute. And will draft up a new request to make existing crafting table recipes tied to certain levels, and also markable as non craftable.

uecasm commented 8 months ago

FYI, recipe templates were added a while back, which might suffice for this sort of use case.