[SPIGOT-3926] Shield blocking not visible after reenter visible range Created: 05/May/18 Updated: 07/May/18 |
|
| Status: | Open |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Fejm | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Steps to reproduce using two Minecraft clients: 1) On 1 client click right mouse button to raise shield Also, when you hold right mouse button and someone shoots you with arrows blocking animation is gone (even if you are still blocking). This issue will confuse players and server staff (player is cheating?) |
| Comments |
| Comment by Fejm [ 07/May/18 ] |
|
It's 100% vanilla bug, clear server.jar (or LAN server) also has this issue. It's not a result of any event. I fixed it by not sending shield updates to other clients (PacketPlayOutEntityEquipment) if only durability of shield was changed. (EntityLiving#B_) There is also another solution, just send player metadata after shield item update but i can't get this working. Meta is always sent before equipment update |
| Comment by md_5 [ 06/May/18 ] |
|
In future please make on ticket per bug. The blocking animation is a result of https://www.spigotmc.org/threads/stripping-down-entitydamageevent-damagemodifier.194446/ |
| Comment by Fejm [ 05/May/18 ] |
|
I found issue of blocking animation disapearing after arrow / sword hit. EntityHuman#damageShield changes ItemStack (durability) so client stops rendering animation. Still not sure how to fix this. |
| Comment by Black Hole [ 05/May/18 ] |
|
Might be a vanilla bug, however I didn't found a matching issue with various searches on https://bugs.mojang.com/ |
| Comment by Fejm [ 05/May/18 ] |
|
It looks like client bug, PacketPlayOutNamedEntitySpawn is send first with metadata, then PacketPlayOutEntityMetadata again with meta and PacketPlayOutEntityEquipment at the end. Sending PacketPlayOutEntityEquipment before PacketPlayOutEntityMetadata should solve this issue. (EntityTrackerEntry#updatePlayer). Not sure how to fix issue with bows/arrows hitting shield. |