CyclopsMC / IntegratedCrafting

Craft stuff in Integrated Dynamics networks
MIT License
7 stars 6 forks source link

Recipe dependency cannot be crafted despite having enough material available #18

Closed tinyrobot closed 5 years ago

tinyrobot commented 5 years ago

Issue type:


Short description:

Recipe with dependency cannot be crafted due to not having enough material available, although enough material is available. Additionally the correct number of dependency items can be crafted separately.

Steps to reproduce the problem:

  1. Given the following recipe: 2019-02-10_11 21 30
  2. When trying to craft 4 of the above, dependencies are said to be missing: 2019-02-10_11 16 26 2019-02-10_11 16 37
  3. When kicking off the dependent items (in this case, the plates) the correct number can be crafted: 2019-02-10_11 16 54

Expected behaviour:

Parent recipe should be craftable as all dependencies are present or craftable


Versions:

I'm sorry that this is so specific, I was unable to come up with a more generalized example.

rubensworks commented 5 years ago

Are you sure that enough redstone is available? Because it seems that is being used for both the dependent (cross thingy) and the dependency (plate).

tinyrobot commented 5 years ago

Yes, sorry I should have explained - the cross thing needs 4 plates and 1 red diamond (center of the recipe) - the inventory already has plenty of red diamonds available, so the only thing being crafted is the plates:

2019-02-10_11 39 03

4 cross things = 16 plates + 4 red diamonds

The inventory has over a stack of red diamonds, and crafting 16 plates via the crafting terminal does work.

Interestingly it looks like the 16 plates are being split into two jobs when I look at it in the crafting job terminal (both screenshots in 2. in 'steps to replicate') - 12 plates and 4 plates - and it looks like the second job (4 plates) is what's causing the issue.

rubensworks commented 5 years ago

I see, thanks for the additional information.

Could you list all mods that are required for coming up with this problem? And perhaps even share your test world with all required recipes configured? That would allow me to debug the problem easier.

tinyrobot commented 5 years ago

Absolutely, here you go - I've not shared a world before, so I have just included the .dat - if you need the whole save zipped please let me know!

level.zip

ThermalExpansion-1.12.2-5.5.2.39-universal RedstoneArsenal-1.12.2-2.6.1.15-universal IntegratedCrafting-1.12.2-1.0.2 IntegratedDynamics-1.12.2-1.0.4 IntegratedTerminals-1.12.2-1.0.2 IntegratedTunnels-1.12.2-1.6.2-306

Dependencies:

Thanks for looking into this!

rubensworks commented 5 years ago

so I have just included the .dat - if you need the whole save zipped please let me know!

Yeah, I'll need the whole world folder, .dat is not enough. Thanks!

tinyrobot commented 5 years ago

Sorry about that :) Creative Test World.zip

Here you go - let me know if you have any issues/there's anything else I can do! Thanks again :)

rubensworks commented 5 years ago

Note to self: the second usage of redstone seems to be ignoring the storage contents, but is instead using the quantity that was used during the last redstone consumption.

rubensworks commented 5 years ago

Note to self: the following plan is in fact also incorrect, as it is crafting one ingot, while 4 must be crafted.

screen shot 2019-02-18 at 17 36 17
rubensworks commented 5 years ago

Alright, after a lot of trouble I've managed to reproduce this case in my unit tests. This will make debugging this a lot more convenient. But that's something for tomorrow.

tinyrobot commented 5 years ago

That's great, thanks @rubensworks! In future, is there more I could be doing to provide a better bug report/conditions to reproduce something like this?

rubensworks commented 5 years ago

No, nothing should be changed at all, what you reported here was great!

Ideally, a use case that is reproducible with only cyclops mods would be ideal, but not really feasible in cases like this.

rubensworks commented 5 years ago

Status update:

Part of this issue has (finally) been fixed, namely the incorrect dependency amounts in the crafting plan for a single plating.

The fix for 4 platings should be related. I'll look into this tomorrow.

rubensworks commented 5 years ago

screen shot 2019-02-20 at 16 46 49

🎉

The actual crafting process also seems to work without any issues.

tinyrobot commented 5 years ago

Awesome, well done! 🎉