canitzp / FeederHelmet

Upgrade all your loved helmets, so they feed you while you do nothing
Other
2 stars 3 forks source link

Fix interaction with Cyclic Uncrafting Grinder. #29

Closed ztahenakos closed 2 years ago

ztahenakos commented 2 years ago

The Grinder will take a helmet that does not have the feeder module installed in it and uncraft it into itself and a feeder module, allowing for infinite duplication of the helmet and modules.

The core of this I believe is with how the Uncrafting Grinder works. When provided an item, it should be looking up crafting table recipes for the item to get the recipe and then reverse it. This is where the problem comes in. In the case of lets say a diamond helmet, the recipe seen is the module + the helmet crafting into that same helmet, while the output of the recipe (what item is actually created) is the helmet plus the feeder module (i.e., the additional NBT tag). This in effect causes an infinite loop. This can be addressed by telling the recipe that the outputted item has the additional NBT tag, which now lets the Uncrafting Grinder work as expected.

canitzp commented 2 years ago

First if all thank you for the pull request. Someone (maybe you?) wrote this issue on curseforge, but at that time I didn't know a solution. I'll make a new release as soon as I have time for it, which shouldn't take long. :blush:

ztahenakos commented 2 years ago

Sounds great! Thanks!!

canitzp commented 2 years ago

Here is the updated version. Hope it now works as intended: https://www.curseforge.com/minecraft/mc-mods/auto-feeder-helmet/files/3723140

ztahenakos commented 2 years ago

Awesome, thanks for the quick turnaround! I did a test build when I made the modification and it looked like it worked for me so we should be all set.

canitzp commented 2 years ago

So I now have to apply this fix to my other helmet mod "Solar Helmet" too