Tfarcenim / DankStorageFabric

Creative Commons Zero v1.0 Universal
11 stars 9 forks source link

Fix canceling upgrade & broken upgrading on 3rd party crafting tables #60

Closed ElementW closed 2 years ago

ElementW commented 2 years ago

The current solution of checking for dank tiers is completely broken, as it relies on ShapedRecipe::assemble(), which is called even if the item doesn't get crafted in many circumstances, including vanilla and even more so on 3rd-party crafting stations such as Improved Stations.

This changes the mod to do inventory upgrades passively; namely when the player open a Dank, puts one in a Dock, or opens a docked Dank (not necessary; for good measure), which cover all the ways an inventory can get accessed (by player or otherwise) after a crafted upgrade. The upgrade item scenario is already covered by current code.

Also introduces the use of loggers instead of System.out.

Tfarcenim commented 2 years ago

oops, I forgot to push changes, let me do that now

Tfarcenim commented 2 years ago

Looks good, I'm not seeing any possible exploits.