Figura

Figura

509k Downloads

"player:getStatusEffect()" does not sync in multiplayer

Gakuto1112 opened this issue ยท 0 comments

commented

Description

player:getStatusEffect() does not sync between avatar host player and other Figura players. It will sync when joining the game, but after that it will not sync at all. In other words, the table which returned by player:getStatusEffect() will not refresh when drinking potion, milk or running /effect.

How to reproduce

In this case, avatar host player is called "host player" and the Figura player who can see host player's avatar is called "guest avatar".

  1. Have another Minecraft player or another Minecraft account.

  2. Install Figura to both of two players.

  3. Inject following code in host player's avatar to check which effects host player has.

    events.ENTITY_INIT:register(function ()
        printTable(player:getStatusEffects(), 2)
    end)

    or

    events.TICK:register(function ()
        printTable(player:getStatusEffects(), 2)
    end)
  4. Start multiplayer.

  5. Guest player turns on "Log non-avatar scripts" to see host player's avatar logs.

  6. Host player drinks potion or milk.

  7. You will see the table differing between host player and guest player.

Host player
Host player

Guest player
Guest player

Enviroment

  • Minecraft 1.19.2
  • Fabric loader 0.14.11
  • Fabric API 0.68.0+1.19.2
  • Figura 0.1.0-rc.12

Notes

  • You can avoid this issue by using ping functions.

Links