Ignoramuses / bing-bing-wahoo

Bringing the physics of Super Mario 64 to Minecraft, one wahoo at a time. Made for ModFest 1.17.
MIT License
12 stars 2 forks source link

Hat duplicates and overwrites *any* item when thrown from offhand. #6

Closed Stereo528 closed 2 years ago

Stereo528 commented 2 years ago

https://user-images.githubusercontent.com/52116771/167758792-9120ccba-8182-444b-9418-3ce31fddf33b.mp4

Anytime the item is thrown from the offhand, the mod thinks it is being thrown from the main hand. Because of this the item in the main hand slot is deleted and thrown as a hat and is now forever a hat.

In the video I use an empty hand as you can always reproduce it making a new one. With an item in the hand you have to throw another hat before the cooldown is done.

Stereo528 commented 2 years ago

I think the culprit is line 44 in MysteriousCapItem.java, it's only and always getting the item in the main hand instead of checking first if the item is in the offhand or main hand. https://github.com/Ignoramuses/bing-bing-wahoo/blob/1.18/src/main/java/net/ignoramuses/bingBingWahoo/cap/MysteriousCapItem.java#L44

asoji commented 2 years ago

Another video of this happening

https://user-images.githubusercontent.com/99072163/167759811-1a8ffe85-76c3-4e0e-b338-12628fc546c9.mp4