1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Interact packet and hold item (slot change)

Discussion in 'Help' started by XenialDan, Oct 4, 2018.

  1. XenialDan

    XenialDan Baby Zombie

    Messages:
    141
    GitHub:
    thebigsmilexd
    Hey,

    I noticed something weird and i am not sure if its caused by pmmp handling the item transactions slower than the interact packet or by mcbe sending them in wrong order..

    When you listen for the InteractPacket (in my case InteractPacket::ACTION_MOUSEOVER) var dump a player's held item causes to dump the correct item when simply hovering an entity, but when you already look at an entity and then change the hold item, it will dump the previously hold item instead of the current one.

    My workaround is to delay the function i call by 1 tick, but this feels bad to do.

    Anyone knows the reason for this/why this happens/how to fix it in a better way?
     
  2. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    Are you saying that the mouseover event is resent when the player changes a hotbar slot?

    The most likely cause of this is MobEquipment changing hotbar slots is not arriving until after the mouseover interaction.
     
  3. XenialDan

    XenialDan Baby Zombie

    Messages:
    141
    GitHub:
    thebigsmilexd
    Yes

    And yeah, this is what i thought.. then it is an issue caused by the client i guess
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.