-
Notifications
You must be signed in to change notification settings - Fork 117
Bedrock 1.21.130 #337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bedrock 1.21.130 #337
Conversation
src/CommandOutputPacket.php
Outdated
| if($this->outputType === self::TYPE_DATA_SET){ | ||
| CommonTypes::putString($out, $this->unknownString); | ||
| } | ||
| CommonTypes::writeOptional($out, $this->unknownString, CommonTypes::putString(...)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the spec say what this is now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/TextPacket.php
Outdated
| self::TYPE_JSON_WHISPER, | ||
| self::TYPE_JSON_ANNOUNCEMENT, | ||
| self::TYPE_JSON, | ||
| ], true)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if(match($this->type){ self::TYPE_RAW => true }) would be better for this
src/TextPacket.php
Outdated
| self::TYPE_CHAT, | ||
| self::TYPE_WHISPER, | ||
| self::TYPE_ANNOUNCEMENT, | ||
| ], true)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same again here
src/TextPacket.php
Outdated
| CommonTypes::getString($in); // systemMessage | ||
| CommonTypes::getString($in); // textObjectWhisper | ||
| CommonTypes::getString($in); // textObjectAnnouncement | ||
| CommonTypes::getString($in); // textObject |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be validated so we don't have encoding symmetry inconsistencies. By which I mean, bail if the strings are not exactly what's expected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how you could like to see it, every implementation i come up with is quite ugly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably a helper function that accepts the expected string would be fine
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
src/TextPacket.php
Outdated
| self::TYPE_JSON_ANNOUNCEMENT, | ||
| self::TYPE_JSON, | ||
| ], true)){ | ||
| Byte::writeUnsigned($out, self::CATEGORY_MESSAGE_ONLY); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, this could be a problem for encoding symmetry too. The decoder doesn't validate that this matches the expected type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we validate the decoding of the strings, it'll be symmetrical already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The real type is decoded after this. So if we see a different category for TYPE_JSON e.g. it won't be re-encoded as we received it. So we should bail on decode if the category doesn't match the type.
|
there is any changes in PlayerSkinPacket?? bec when i do |
|
@WenoxGB Could you please confirm that
|
|
@DaisukeDaisuke yes its turned off.. when i reload the world, entity reconstruct than the skin show.. |
we don't want to break packet encode/decode symmetry testability. Putting it in the static constructor should avoid most side effects. It's not ideal, but the alternative is forcing every place that might have given empty strings to check manually, which would take a lot more work.

No description provided.