Skip to content

Invalid entity data item type for field 17 - client 1.21.4 kicked when near entities sent from 1.21.11 backend #1245

@caiobarnes

Description

@caiobarnes

'/viaversion dump' Output

Plugins: ViaVersion and ViaBackwards

Server/Client Error

java.lang.IllegalStateException: Invalid entity data item type for field 17 on entity cit['entity_name'/ID, l='ClientLevel', x=..., y=..., z=...]: old=Reference{ResourceKey[minecraft:frog_variant / minecraft:temperate]=chk[texture=minecraft:textures/entity/frog/temperate_frog.png]}(class jr$c), new=IDLE(class cii$a$1)
	at akc.a(SynchedEntityData.java:181)
	at akc.a(SynchedEntityData.java:167)
	at ggb.a(SourceFile:587)
	at aev.a(SourceFile:54)
	at aev.a(SourceFile:12)
	at ggb.a(SourceFile:2304)
	at abx.a(SourceFile:19)
	at abx.a(SourceFile:7)
	at yz.lambda$checkThreadAndEnqueue$0(PacketUtils.java:44)```


### Bug Description

Players connecting with a 1.21.4 client to a 1.21.11 backend server are immediately kicked with "Network Protocol Error" when certain entities are within their view distance.

The error indicates that ViaBackwards is not correctly translating entity metadata field 17 for these entities. The server sends a value of type IDLE (likely a Copper Golem state or similar new entity data from 1.21.9+), but the 1.21.4 client expects field 17 to be a frog_variant Reference type. This mismatch causes the client to throw an IllegalStateException and disconnect.

Killing the problematic entities on the server side resolves the issue, confirming the cause is the entity metadata translation.

### Steps to Reproduce

1. Set up a backend server running 1.21.11 with ViaVersion + ViaBackwards
2. Spawn or have entities present that use entity data fields introduced after 1.21.4 (entities with an IDLE state field, possibly Copper Golems or custom-named mobs using newer entity types)
3. Connect with a 1.21.4 client
4. Move within view distance of these entities
5. Client is immediately kicked with "Network Protocol Error" due to Invalid entity data item type for field 17

### Additional Server Info

Plugins related to version compatibility:

ViaVersion
ViaBackwards

### Checklist

- [x] Via plugins are only running on **EITHER** the backend servers (e.g. Paper) **OR** the proxy (e.g. Velocity), **not on both**.
- [x] I have included a ViaVersion dump.
- [x] If applicable, I have included a paste (**not a screenshot**) of the error.
- [x] I have tried a build from https://ci.viaversion.com/ and the issue still persists.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions