MyPet
MyPet copied to clipboard
fix: leash and off-hand interactions
Currently, right-clicking on a pet entity with an empty hand will swing the off-hand. This behavior is unintended, and does not match vanilla.
I have also cleaned up leash interactions in this PR. Currently, when a pet entity is right-clicked with a lead, a Bukkit scheduler task is created to run 5 ticks later and update the client leash state. Instead, we can move the synchronization code into an overridden vanilla method.
I have to disagree with parts of this PR (haven't really looked at the code changes yet, they might be useful but for different reasons).
The off-hand swing only occurs with certain pet-entities, maybe even only the parrot. This is probably bc it has a vanilla interaction. Without your Screenshot I'd think it would be clientside - like the Allay-PickUp-Animation.
I'll take a look at the rest of your changes later. They might render some extra stuff I had to introduce for Piglins and Allays obsolete but we'll see.