AbyssalCraft

AbyssalCraft

20M Downloads

Materializer Recipies Losing Output Item (machine and JEI)

Nonsanity opened this issue · 5 comments

commented

I’ve been using the Elytra recipe in the Materializer. The recipe was visible in JEI and worked when I had enough of the elemental ingredients in the supplied bag. I would shift-click Elytras out of the Materializer until the bag ran out of ingredients. I then generated more ingredients and repeated the procedure. The third or fourth time, the Elytra did not appear among the output options (only coal and charcoal, from the carbon component). Double-checking the recipe in JEI, the recipe entry was still there, but the amounts had changed and the output was empty. The situation persisted even after several scheduled reboots, and after breaking and replacing the Materializer.

I then had another player on the server look at the Materializer’s output and he could see the Elytra among the options while I could not. He could also see it in JEI. He proceeded to shift-click out Elytras. To his eye, he created four before the Materializer ran out of something. However, the fourth was a visual glitch and did not actually exist. I refilled the bag with stacks of all four necessary elements, but he could no longer see the Elytra in the Materializer’s output window.

While writing the above report, I think I came up with a hypothesis as to what is happening. Please bear with me and let this report remain somewhat incomplete until I can do some tests. I’ll complete it (with version numbers and the results of my tests) within 24 hours.

I suspect that having an amount of one or more elements that isn’t evenly divisible by the recipie’s needs, and rapidly shift-clicking copies of the output, results in a ghost item being created for the last click (for which there weren’t quite enough of some of the elements) and the required remainder for that click becoming the new, broken recipe for that player.

More soon...

commented

Minecraft: 1.12.2
AbyssalCraft version : 1.12.2-1.9.4.3
Forge: 14.23.1.2587

After my limited testing, it seems the cause of the problem is just shift-clicking the elytra out of the Materializer. At least, I brought on a second account and did just that and got a ghosted elytra that quickly vanished. After that, the JEI recipe had nothing in the output anymore for that account, though the recipe was correct (C8, H13, O5, N1). In my primary account, logged into the same account at the same time, the JEI recipe is (C1, H1, O5, N1) for some reason.

That's all I've got on this for now. If I can help in anyway in the debugging of the problem, please let me know.

commented

I believe you have provided sufficient information in order to track down the cause of this. I'll start poking around in the code after work, then see what I can find based on your tests.

commented

I think it was a restart of Minecraft that cleared the problem up for me. The bug is still repeatable when i shit-click the item out, but after a fresh startup, as long as I drag the items out, everything works as it should.

(I though it had failed again at one point, but I had run out of Hydrogen crystals. I didn’t realize at first because the O, h, and N all have the same icon. Might want to recolor some of them.) :)

commented

Having done a bunch of tests yesterday, the elytra seems to be something of an edge case, as I haven't been able to reproduce the same circumstances with any other item or block. Another thing is the fact that shift-clicking isn't functional in 1.9.4.3 (apart from making ghost items that disappear the second you leave the GUI), so I'm confused as to how you managed to shift-click real elytras out of the Materializer without it properly supporting shift-clicking from the output slots (however, with proper shift-clicking implemented I was able to reproduce the "materialize 4 elytras, recipe goes poof" circumstance).
By the looks of it, I'm getting the impression that the recipe object for the materialization somehow ends up getting modified through continuous uses (got it to happen on both shift-clicking and normal clicking).

EDIT: Wrote some code which creates a more thorough copy of the recipe object inputs for the comparison checks used when calculating what can be materialized and later to process the materialization. This stopped the elytra recipe from suddenly changing the stack sizes of the inputs!

commented

It may have been that I originally combined dragging and shift-clicking and only the dragged items survived. But I’m glad you found, or at least solved, the problem. :)