Skip to content

Failed to encode Minecraft Component on displayName() #12213

@spring-dependency-management

Description

Stack trace

java.lang.RuntimeException: Failed to encode Minecraft Component: translation{key='chat.square_brackets', args=[empty[style={italic}, siblings=[io.papermc.paper.adventure.AdventureComponent@d7c3825c]]]}[style={color=aqua,hoverEvent=TypedHoverEvent[action=<action show_item>, value=net.minecraft.network.chat.HoverEvent$ItemStackInfo@9f802d36]}]; Value must be within range [1;99]: 169
	at io.papermc.paper.adventure.WrapperAwareSerializer.lambda$deserialize$0(WrapperAwareSerializer.java:28) ~[paper-1.21.4.jar:1.21.4-DEV-1d5e5a5]
	at com.mojang.serialization.DataResult$Error.getOrThrow(DataResult.java:287) ~[datafixerupper-8.0.16.jar:?]
	at io.papermc.paper.adventure.WrapperAwareSerializer.deserialize(WrapperAwareSerializer.java:28) ~[paper-1.21.4.jar:1.21.4-DEV-1d5e5a5]
	at io.papermc.paper.adventure.WrapperAwareSerializer.deserialize(WrapperAwareSerializer.java:13) ~[paper-1.21.4.jar:1.21.4-DEV-1d5e5a5]
	at io.papermc.paper.adventure.PaperAdventure.asAdventure(PaperAdventure.java:192) ~[paper-1.21.4.jar:1.21.4-DEV-1d5e5a5]
	at org.bukkit.craftbukkit.inventory.CraftItemFactory.displayName(CraftItemFactory.java:229) ~[paper-1.21.4.jar:1.21.4-DEV-1d5e5a5]
	at org.bukkit.inventory.ItemStack.displayName(ItemStack.java:728) ~[paper-api-1.21.4-R0.1-SNAPSHOT.jar:?]

Plugin and Datapack List

My plugin

Actions to reproduce (if known)

Create itemstack with more than 99 amount, undefined behaviour thereafter

Paper version

This server is running Paper version 1.21.4-DEV-main@1d5e5a5 (1970-01-01T00:00:00Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-DEV-f63dbea (MC: 1.21.4)

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions