Skip to content

Fix TextPacket.needsTranslation not being preserved across deserializ… - #339

Merged
PetteriM1 merged 1 commit into
CloudburstMC:3.0from
CDS114514:fix/TextPacket-needsTranslation
Jul 17, 2026
Merged

Fix TextPacket.needsTranslation not being preserved across deserializ…#339
PetteriM1 merged 1 commit into
CloudburstMC:3.0from
CDS114514:fix/TextPacket-needsTranslation

Conversation

@CDS114514

Copy link
Copy Markdown
Contributor

Fix TextPacket.needsTranslation not preserved across deserialize/re-serialize

Summary

All TextSerializer deserialize() methods read needsTranslation from the wire but never store it back to the packet object. After deserialization, packet.isNeedsTranslation() always returns false, regardless of what the server actually sent.

This causes translation keys (e.g. %multiplayer.player.joined) to be incorrectly tagged as needsTranslation=false when the packet passes through any proxy that deserializes and re-serializes it.

Fix

Added packet.setNeedsTranslation(needsTranslation) after buffer.readBoolean() in:

  • v291 / v332 / v554 / v898 / v924

…e/re-serialize

All TextSerializer deserialize() methods read needsTranslation from the
buffer but never call packet.setNeedsTranslation(), causing it to default
to false on re-serialization.

Fix: add packet.setNeedsTranslation(needsTranslation) after reading the
boolean in v291, v332, v554, v898, and v924. v685 inherits from v554.
@PetteriM1
PetteriM1 merged commit f349f3d into CloudburstMC:3.0 Jul 17, 2026
1 check passed
@CDS114514
CDS114514 deleted the fix/TextPacket-needsTranslation branch August 14, 2026 03:24
@CDS114514
CDS114514 restored the fix/TextPacket-needsTranslation branch August 14, 2026 03:24
@CDS114514
CDS114514 deleted the fix/TextPacket-needsTranslation branch August 14, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants