superfluke / undiscovered

0 stars 1 forks source link

Creative RF Source recipe accepts any type of induction cell. #79

Closed BlueAgent closed 5 years ago

BlueAgent commented 6 years ago

~Creative RF Source fails to craft if ultimate induction cells were crafted using atomic multiplier'ed basic induction cells or induction cells that were placed down in the world then put into the table.~

~Not sure if this is intended behaviour, but if it is, a warning should be put in the quest book so that people don't use the atomic multiplier for the basic cells used for crafting or place them down first (say they were using induction cells for power storage before switching to draconic energy storage). Something like "Only freshly crafted components should be used when crafting the ultimate induction cell"~

Since Mekanism stores the tiers in the nbt, ideally the recipe would need to match the presence of the tier: 3 tag, and ignore the remainder.

If you're okay with allowing used ultimate induction cells to be used in the crafting recipe, I looked into this a bit. I'm not sure if this issue can be resolved through changing the scripts, however, I'll detail some testing that went on.

Current:

var ultimateInduction = <mekanism:basicblock2:3>.withTag({tier: 3});

Craft Tweaker does support this through the use of

var ultimateInduction = <mekanism:basicblock2:3>.onlyWithTag({tier: 3});

However when I tried using onlyWithTag it resulted in a blank space where the induction cell should be... I tried using

<mekanism:basicblock2:3>.withTag({tier: 3}).onlyWithTag({tier: 3});

as suggested here: https://github.com/CraftTweaker/CraftTweaker/issues/116#issuecomment-368095586 but this also resulted in a blank space. Perhaps ExtendedCraft's doesn't make use of IIngredient...?

It turns out that it does accept IIngredient, however it converts them to IOreDictEntry and IItemStack which unfortunately loses the conditions.

So in the end, it turns out that it isn't currently possible to partially match an item's nbt ~partially for ExtendedCrafting since it converts it to a singular item stack or ore dict entry~ at all.

Undiscovered 2.14.1

superfluke commented 6 years ago

Yeah trying to match just one part of an nbt tag has been a headache a few times. Thanks for testing those other things out, I'll see what I can do here.

superfluke commented 6 years ago

I cant reproduce this. Even using a cell that has some power nbt from an induction matrix I'm still able to craft the power cell (which makes sense from your other issue about nbt not being checked). image

In fact, the recipe doesnt seem to care if I mix and match varying tiers of cells due to it not checking nbt image

BlueAgent commented 6 years ago

I found out the problem, I was using draconic energy crystals instead of wireless ones... but when I went to test it in single player to spawn items in I correctly used the wireless ones, and never testing the base case.

Once using the correct wireless crystals it crafts using any tier of induction cell like in your testing. Sorry for the mistake!

A potential soultion/workaround is to have, a normal crafting table recipe for making an intermediate item that has the mekanism items/blocks in the recipe. This should work properly using withTag({tier: 3}).withOnlyTag({tier: 3})

BlueAgent commented 5 years ago

Closing as MelanX mentioned it should just require an update to extended crafting, which would probably be done the next time the pack is updated.