Platymemo / alaskanativecraft

Alaska Native Craft is a mod looking to bring Alaska Native cultures to Minecraft!
Creative Commons Zero v1.0 Universal
9 stars 12 forks source link

Possible fix for stacking Problems #42

Closed quiqueck closed 3 years ago

quiqueck commented 3 years ago

Replace getOrCreateTag with getTag and null-test when checking for DurabilityMultiplier. This shouldprevent the generation of empty tag-entries that prevent stacking.

41 is fixed in my test. The code for the DurabilityMultiplier is executed (tested with diamond harpoon), but since I am not familiar with this new mechanic, I could have introduced a regression.

Platymemo commented 3 years ago

I'll merge this rn as I want to push this fix out ASAP, but I noticed a couple of ways to make the code slightly cleaner, which I'll commit myself. Thank you for this! I gave myself a hard deadline and so did not do nearly enough testing it seems, haha.

quiqueck commented 3 years ago

It is really refreshing to see that code-quality is a real concern for this project! Makes the code-base real easy to understand.

Not sure why I didn't think of hasTag tho :)