Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] limit useAnimations #245

Merged

Conversation

lonefelidae16
Copy link
Contributor

@lonefelidae16 lonefelidae16 commented Mar 23, 2023

fix #244 , revert #207

The “Refine” will be reverted that I implemented.

This limits bobbing animations to conform to the specification of the previous version.


Checklist

  • Do not animate when:

    • Attack an Entity.
    • Break a Block.
    • Interact to a Block with an Item (such as Axe -> Logs).
    • (Update) Use Fishing rod and Shears.
    • (Update) Block an attack.
  • Fix interruption of bobbing animation when:

    • Throw eggs, snow balls, ender pearls and bottle o’ enchanting.
    • Launch fireworks rocket for elytra flight.
    • Use bucket items: Lava, Powder snow, Water and fill with Bucketable entity.
  • Also works when the item was in Offhand.


Changes

  • update AnimationsHelper

    • add methods:
      • notifyChangedSlot to store Hotbar slot index of the changed item
      • consumeChangedSlot to retrieve which an item has been changed
  • update mixin.client.features.useAnimations.ClientPlayerInteractionManagerMixin

    • injection methods have been removed:
      • bedrockify$useWeaponBreakable
      • bedrockify$useToolBreakable
      • bedrockify$useItemToBlock
  • update mixin.client.features.useAnimations.ClientPlayerEntityMixin

    • injection method has been removed:
      • bedrockify$handleEntityStatus
  • update mixin.client.features.useAnimations.ClientPlayNetworkHandlerMixin

    • method name has been changed:
      • bedrockify$animateAlways -> bedrockify$animateAlwaysSlotUpdate
    • new injection method has been added:
      • bedrockify$animateAlwaysInventory to handle the packet that could not be caught by SlotUpdate

This limits bobbing animations to conform to the specification of the previous version.

* update `AnimationsHelper`
  - add methods:
    + `notifyChangedItem` to store changed item in Hotbar
    + `consumeChangedItem` to retrieve which an item has been changed

* update `mixin.client.features.useAnimations.ClientPlayerInteractionManagerMixin`
  - injection methods have been removed:
    + `bedrockify$useWeaponBreakable`
    + `bedrockify$useToolBreakable`
    + `bedrockify$useItemToBlock`
  - method injection point has changed:
    + `bedrockify$consumeItem`: `interactItem` -> `method_41929`

* update `mixin.client.features.useAnimations.ClientPlayerEntityMixin`
  - injection method has been removed:
    + `bedrockify$handleEntityStatus`

* update `mixin.client.features.useAnimations.ClientPlayNetworkHandlerMixin`
  - method name has changed:
    + `bedrockify$animateAlways` -> `bedrockify$animateAlwaysSlotUpdate`
  - new injection method has added:
    + `bedrockify$animateAlwaysInventory` to handle the packet that could not be caught by `SlotUpdate`
* update `AnimationsHelper`
  - method name has been changed: `notifyChangedItem` -> `notifyChangedSlot`
    + handles based on slotIndex instead of Item
@juancarloscp52 juancarloscp52 merged commit c3d017c into juancarloscp52:1.19.4 Apr 1, 2023
@lonefelidae16 lonefelidae16 deleted the fix/use-animation branch May 3, 2023 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hotbar animation error
2 participants