Tinkers Construct

Tinkers Construct

160M Downloads

Adding conflicting part builder recipes

RCXcrafter opened this issue ยท 5 comments

commented

I am adding a wood type material (bamboo in this case) to my mod but it's uncraftable because any item registered as plankWood results in the default wood material because it's registered first.

I am aware that I can unregister and reregister wood to move it after my wood material or I can register my wood material earlier, but that messes with the order of the materials in the book and I don't think that looks nice.

Is there some other way I can prevent certain Items from always resulting in wood? I've looked at the ToolPartCraftingEvent but it contains no info on the item being used to craft and doesn't allow the resulting item to be overridden. My suggestion would be to have the toolpart crafting check for more specific results if the current recipe match is an oredict match.

Sorry for opening so many issues in such a short amount of time.

commented

i believe there is hacky ways to do it, don't remember which mods was doing it for natura support but i believe it was plustic ๐Ÿค”

commented

plustic does it by removing the wood material and reregistering it after its own wood materials which isn't a very nice way of doing it in my opinion.

commented

indeed it's not pretty. we definitely need a better solution this problem.

commented

Hm, I'd have said prevent it with the event so it also checks the other recipe, but as you said that doesn't work due to missing information. Easiest way is to work around it by creating a separate item just for toolpart crafting.. bundle of bamboo ;)
Other than than I don't see a way of doing it without requiring changes on our side.

Also don't worry about the issues. The APIs simply haven't been used that much, so there's bound to be a few things that don't work out as expected yet.

commented

1.16 moves all the recipes to JSON, making it trivial to replace an existing recipe to separate out an item like you described. Going to close this as 112 won't change.