MyPet icon indicating copy to clipboard operation
MyPet copied to clipboard

fix: leash and off-hand interactions

Open nkomarn opened this issue 2 years ago • 1 comments

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.

image

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.

image

nkomarn avatar Jun 27 '22 21:06 nkomarn

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.

Jakllp avatar Jun 28 '22 05:06 Jakllp