MerchantPug / apugli

An extension to Apoli for certain mods' use.
MIT License
5 stars 4 forks source link

Weird interaction between Better Combat, MC Dungeons Weapons and TooManyOrigins #54

Closed finnglink closed 1 year ago

finnglink commented 1 year ago

Hey! I'm having a really weird issue with my little pack, which seems to come from some sort of correlation between the three named mods: When I equip a two handed weapon form MCDW / BC while holding something in my offhand, that item gets deleted. And this seems to be caused by TMO, removing that fixes it. Any ideas why the might be happening?

MerchantPug commented 1 year ago

Better Combat issue and duplicate of https://github.com/MerchantPug/apugli/issues/51.

I can really only bandaid fix this in Apugli (a library that TooManyOrigins uses) by making the check specifically for ItemStack.EMPTY, rather than ItemStack#isEmpty.

That mod should probably not return non empty ItemStacks with 2h weapons as empty to avoid situations like this in the future.

A more detailed explanation can be found below: https://github.com/ZsoltMolnarrr/BetterCombat/issues/268#issuecomment-1679088344

MerchantPug commented 1 year ago

Will be fixed next update.

finnglink commented 1 year ago

@MerchantPug awesome! Feel free to ping me to test it, and I'll just drop it in my pack to check

MerchantPug commented 1 year ago

Re-opening as it was agreed upon that the fix would be cleaner if it were done on my end.

MerchantPug commented 1 year ago

and my previous commit didn't actually fix it... At least it got me to optimise everything a bit.

MerchantPug commented 1 year ago

Fixed, it scared me initially because I didn't know how the mechanic worked, but your items should now be preserved in your offhand. If any of you have a server with players, please give them back their items that they lost due to this bug.

javaw_LOdci3X6BQ

MerchantPug commented 1 year ago

Fixed in 2.6.5. Will be fixed in TMO 0.9.3 and 1.0.0-beta.18