Mojira Archive
MC-160915

Json text crashes the game when rendered if it attempts to translate a string containing the "%" character

The bug

When the game tries to render and translate an item that contains "%", the game will crash.

How to reproduce

Type

/give @p stone{display:{Name:"{\"translate\":\"%\"}"}}

into the chat, the game will crash immediately and when you reopen the world.

/give @p stone{display:{Lore:["{\"translate\":\"%\"}"]}}

will also crash the game, but only when you mouse over the item.

Crash report

Description: Unexpected error

jz: Error parsing: TranslatableComponent{key='%', args=[], siblings=[], style=Style{hasParent=true, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}: Unsupported format: '%'
	at jy.b(SourceFile:106)
	at jy.i(SourceFile:62)
	at jy.c(SourceFile:162)
	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:267)
	at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1351)
	at java.util.stream.StreamSpliterators$WrappingSpliterator.lambda$initPartialTraversalState$0(StreamSpliterators.java:294)
	at java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.fillBuffer(StreamSpliterators.java:206)
	at java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.doAdvance(StreamSpliterators.java:161)
	at java.util.stream.StreamSpliterators$WrappingSpliterator.tryAdvance(StreamSpliterators.java:300)
	at com.google.common.collect.CollectSpliterators$1FlatMapSpliterator.tryAdvance(CollectSpliterators.java:226)
	at java.util.Spliterators$1Adapter.hasNext(Spliterators.java:681)
	at jo.e(SourceFile:77)
	at cyv.c(SourceFile:640)
	at cyv.a(SourceFile:221)
	at dnc.a(SourceFile:657)
	at cyc.e(SourceFile:954)
	at cyc.b(SourceFile:410)
	at net.minecraft.client.main.Main.main(SourceFile:155)

Fixed

??? ???

[Mojang] slicedlime

2019-09-11, 11:07 PM

2019-09-27, 12:35 PM

2019-09-27, 12:35 PM

2

2

Confirmed

Very Important

Crash

1.14.4, 19w37a

19w39a