[MCPE-6865] Inconsistent protocol data types usage Created: 11/Feb/14  Updated: 23/Apr/14  Resolved: 23/Apr/14

Status: Resolved
Project: Minecraft (Bedrock codebase)
Component/s: None
Affects Version/s: 0.8.0, 0.8.1
Fix Version/s: 0.9.0 Build 1

Type: Bug
Reporter: [Mojang] Shoghi Cervantes
Resolution: Fixed Votes: 0
Labels: None

Confirmation Status: Unconfirmed
Platform: Phone - iOS - iPhone 4

 Description   

In the Minecraft: PE multiplayer protocol there are a few packets that don't use the standard data types. Most of them don't cause bugs now, but a few of them could do in the future.

UseItemPacket

The Item Damage (6th field) should be a short instead of a byte.

LevelEventPacket

The X, Y, Z fields are shorts, instead of integers.

EntityDataPacket

First, this packet only is sent for Tiles... so the Entity part is confusing
Second, the X and Z fields are shorts instead of integers.

ContainerOpenPacket

The Slot Count field is a byte, while in ContainerSetContentPacket and ContainerSetSlotPacket the Slot Count/Index is a short.

ChatPacket and MessagePacket

MessagePacket is used for player chat and ChatPacket for server messages (like when you can't sleep on bed). A bit confusing



 Comments   
Comment by Johan Bernhardsson [ 23/Apr/14 ]

Fixed the first four issue, leaving the ChatPacket vs MessagePacket as is for now.

Generated at Sat Jan 11 14:34:26 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.