function animation(p: player, id: integer):
set {_packet} to new play_server_animation packet
set field 0 of {_packet} to {_p}'s id
set field 1 of {_packet} to {_id}
send {_p} packet {_packet}
send "worked" to {_p}
on damage of player:
attacker is player:
cancel event
remove 1 from {combatstats::%victim's uuid%::health}
animation(victim, 1)```
this bit of code is working fine, but the animation is not playing. the function is working properly, due to the message being sent. i assume this is an issue with an NMS change or skript-packet update.
#animation packet failing to play (assuming incorrect version of skript or related addons)
1 messages · Page 1 of 1 (latest)
ok i've made sure all my addons are up-to-date, it seems to be a change in minecraft's packet handling. if anyone has any solutions, let me know.
it seems to be an issue with the id, the packet and animation are fine, but the player's id is incorrect.
even with the correct entity id, it still doesn't play the hurt animation
i don't see anything wrong with this, did something change between versions 1.19.2 and 1.19.4 with the EntityAnimationS2CPacket?
do i have to provide the other packets such as HealthUpdateS2CPacket or DamageTiltS2CPacket
adding those still gives no result
this is the EntityAnimation packet from the damage event,
this is the EntityAnimation packet from the function, but it has no effect
since packets seem to be broken with 1.19.4's release, are there any skript-reflect workarounds or workarounds with other addons?
i don't want to use damage player by 0.0001 because that would play the damage tilt and the hurt sound
i have just updated ProtocolLib to v5.0.0 (it was on 5.0.0 SNAPSHOT because of incompatability reasons) and it still sends a broken packet
i tested this out and it didint work for me either, you could damage the player by a miniscule amount to substitute this: set damage to 0.0001
it will play the animation but do almost no damage
and you can always heal the player afterwards if you want to be sure
oh i didint read the emssage
what kind of animation are you trying to achieve?
i am trying to send an EntityAnimation packet to a player with fields <player's id, 1> to play the hurt animation and nothing else
this code used to work on another server of mine that was on 1.19.2, but on a 1.19.4 server it doesn't seem to have any effect
other packets can be played in skript-packet just fine
might be a bug with skript-packet then
i just updated it from 2.1.0 to 2.1.2, but i'll test other versions to see if it's an issue with skript-packet
i don't know what the root cause is, becuase it's sending the packet just fine, it should be playing. i don't know if it's an issue with skript-packet, protocollib, skript, the server software, or other addons