pmmp / BedrockProtocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP
GNU Lesser General Public License v3.0
135 stars 90 forks source link

Adding CameraTargetInstruction to CameraInstructionPacket results in broken packet #268

Open LuciaDX opened 1 week ago

LuciaDX commented 1 week ago

When i add target instruction it results in broken packet because for some reason putActorUniqueId isnt right. image

Changing this to putLLong fixes the problem image

ismaileke commented 1 week ago

what about 'putUnsignedVarLong()'

LuciaDX commented 1 week ago

what about 'putUnsignedVarLong()'

It says that its not usigned on their docs image

I tried using long, it doesnt break packet but game refuses to read it so i think this is long long and not others because every single one breaks the packet

nicholass003 commented 1 week ago

When i add target instruction it results in broken packet because for some reason putActorUniqueId isnt right. image

Changing this to putLLong fixes the problem image

yes, that's right, it must be the same as this, because it's the same type https://github.com/pmmp/BedrockProtocol/blob/master/src/types/AbilitiesData.php#L58

CameraTargetInstruction.targetActorUniqueId source: https://github.com/Mojang/bedrock-protocol-docs/blob/main/changelog_712_7_16_24.md

Changelogs: changelog_712_7_16_24.md
* Added mTargetActorId (int64_t)

AbilitiesData.targetActorUniqueId source: https://github.com/Mojang/bedrock-protocol-docs/blob/main/previous_changelogs/changelog_553_08_31_22.md

Changelogs: changelog_553_08_31_22.md
* Add mTargetPlayer.rawID (int64_t)