Skip to content
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

TextContent::Translate.with Serialization is not working #395

Open
1 task done
topi-banana opened this issue Dec 12, 2024 · 0 comments
Open
1 task done

TextContent::Translate.with Serialization is not working #395

topi-banana opened this issue Dec 12, 2024 · 0 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@topi-banana
Copy link
Contributor

I've searched existing issues and couldn't find a duplicate.

  • I confirm this is not a duplicate.

Operating System

WSL devcontainer

Server Software Version/Commit

2ee2cc0

What happened?

image

To Reproduce

player.send_system_message(TextComponent {
  content: TextContent::Translate {
    translate: "commands.kill.success.single".into(),
    with: vec![Text(Box::new(TextComponent::text("SampleText")))],
  },
  style: Style::default(),
  extra: vec![],
})

👇Packet details by SniffCraft (some omitted)

{
    "content": {
        "content": {
            "translate": {
                "content": "commands.kill.success.single",
                "name": "translate",
                "type": "TagString"
            },
            "with": {
                "content": [
                    [ 10, 8, 0, 4, 116, 101, 120, 116, 0, 20, 101, 110, 116, 105, 11, .... ]
                ],
                "name": "with",
                "type": "TagList"
            }
        },
        "name": "",
        "type": "TagCompound"
    },
    "overlay": false
}

Expected behavior

in vanilla

image

/tellraw @a [{"translate":"commands.kill.success.single", "with":["SampleText"]}]
{
    "content": {
        "content": {
            "translate": {
                "content": "commands.kill.success.single",
                "name": "translate",
                "type": "TagString"
            },
            "with": {
                "content": [
                    "SampleText"
                ],
                "name": "with",
                "type": "TagList"
            }
        },
        "name": "",
        "type": "TagCompound"
    },
    "overlay": false
}
@topi-banana topi-banana added the bug Something isn't working label Dec 12, 2024
@Snowiiii Snowiiii added this to Pumpkin Dec 13, 2024
@Snowiiii Snowiiii moved this to Todo Bugs in Pumpkin Dec 13, 2024
@Snowiiii Snowiiii added the good first issue Good for newcomers label Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
Status: Todo Bugs
Development

No branches or pull requests

2 participants