"player:getStatusEffect()" does not sync in multiplayer
Gakuto1112 opened this issue ยท 0 comments
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".
-
Have another Minecraft player or another Minecraft account.
-
Install Figura to both of two players.
-
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)
-
Start multiplayer.
-
Guest player turns on "Log non-avatar scripts" to see host player's avatar logs.
-
Host player drinks potion or milk.
-
You will see the table differing between host player and 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.