Sandertv / gophertunnel

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

Client crashes when joining a BDS server with the new camera features #188

Closed IvanCraft623 closed 1 year ago

IvanCraft623 commented 1 year ago

This happens specifically when gophertunnel retransmits the CameraPresets packet

IvanCraft623 commented 1 year ago

There is a world with new cameras enabled here.

Although I already reported this on discord it is better to open an issue here.

JavierLeon9966 commented 1 year ago

The issue here is that the camera's experiment isn't in the ResourcePackStack packet experiments field. To workaround this you would need to override this https://github.com/Sandertv/gophertunnel/blob/a4bc2f93fb3d2fe77c684368f8fb7e9857ee2772/minecraft/conn.go#L979 with:

pk := &packet.ResourcePackStack{BaseGameVersion: protocol.CurrentVersion, Experiments: []protocol.ExperimentData{{Name: "cameras", Enabled: true}}}

Perhaps gophertunnel can somehow get the GameData before reaching that stage so this can be fixed permanently.