Open Zailer43 opened 6 months ago
The following NBT of a container can cause a java.lang.OutOfMemoryError: Java heap space. Therefore, this is prevented in the Name of the items on display, but it is not checked in the CustomName of the BlockEntityTag.
java.lang.OutOfMemoryError: Java heap space
Name
display
CustomName
BlockEntityTag
https://github.com/ds58/Panilla/blob/c384c90832977799dbdefa46fe9f72e4a91d0f30/api/src/main/java/com/ruinscraft/panilla/api/nbt/checks/NbtCheck_display.java#L35-L78
Edit: I was testing, and currently, Panilla doesn't fix it in books either, only in the item name
{BlockEntityTag: {CustomName: '[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["","overwritelox"]}]]}]]}]]}]]}]]}]]}]]}]]}]]}]]}]'}}
{BlockEntityTag: {CustomName: "[{\"translate\":\"%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s\",\"with\":[\"\",[{\"translate\":\"%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s\",\"with\":[\"\",[{\"translate\":\"%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s\",\"with\":[\"\",[{\"translate\":\"%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s\",\"with\":[\"\",[{\"translate\":\"%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s\",\"with\":[\"\",[{\"translate\":\"%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s\",\"with\":[\"\",[{\"translate\":\"%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s\",\"with\":[\"\",[{\"translate\":\"%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s\",\"with\":[\"\",[{\"translate\":\"%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s\",\"with\":[\"\",[{\"translate\":\"%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s\",\"with\":[\"\",[{\"translate\":\"%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s%2$s\",\"with\":[\"\",\"overwritelox\"]}]]}]]}]]}]]}]]}]]}]]}]]}]]}]]}]"}}
Edit: Book
/give @s minecraft:written_book{pages:['[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["",[{"t\\u0072a\\u006es\\u006ca\\u0074e":"%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073%\\u0032$\\u0073","w\\u0069t\\u0068":["","overwritelox"]}]]}]]}]]}]]}]]}]]}]]}]]}]]}]]}]'],title:"haha funny book", author:"Notch"}
Details
The following NBT of a container can cause a
java.lang.OutOfMemoryError: Java heap space
. Therefore, this is prevented in theName
of the items ondisplay
, but it is not checked in theCustomName
of theBlockEntityTag
.https://github.com/ds58/Panilla/blob/c384c90832977799dbdefa46fe9f72e4a91d0f30/api/src/main/java/com/ruinscraft/panilla/api/nbt/checks/NbtCheck_display.java#L35-L78
Edit: I was testing, and currently, Panilla doesn't fix it in books either, only in the item name
NBT
Edit: Book