Sandertv / gophertunnel

General purpose library for Minecraft Bedrock Edition software written in Go
MIT License
423 stars 96 forks source link

Resource/Behaviour Packs having the same UUID #18

Closed gioiann closed 5 years ago

gioiann commented 5 years ago

Some servers (play.insomniape.eu:19132) will send a ResourcePacksInfo packet with a Resource and Behaviour pack having the same UUID and the same size (likely the same pack wrongly sent as both resource and behaviour)

The client will only really download a resource pack, display no error and proceed with the normal spawning sequence

gophertunnel instead when receiving the ResourcePacksInfo sends the server a ResourcePackClientResponse(ResponseSendPacks) having the same pack UUID twice. This will make the server send the same ResourcePackDataInfo twice causing this error: unknown pack to download with UUID ...

I understand this is completely the server's fault. It's up to you deciding if you want to make gophertunnel closer to the Minecraft behaviour or not. I already fixed the issue myself in an hacky way. In case you want to know how, just ask.

Sandertv commented 5 years ago

I'll see if I can put something in place to cater for that.

gioiann commented 5 years ago

https://github.com/Sandertv/gophertunnel/blob/master/minecraft/conn.go#L745

This check also causes problems if a resource pack is wrongly sent as a behaviour pack by the server

pack.HasBehaviours() == hasBehaviours

You should try to join play.insomniape.eu:19132

Sandertv commented 5 years ago

Just a question, is the pack expected to be a resource pack or a behaviour pack? I don't know how to handle it.

gioiann commented 5 years ago

It's a resource pack which is also sent as a behaviour pack, as explained in my first comment

gioiann commented 5 years ago

It's not a behaviour pack but it's wrongly sent in the behaviourpacks entries so pack.HasBehaviours() is false and hasBehaviours is true