minity-script / minity

Minity is a scripting language for Vanilla Minecraft
https://minity-script.github.io
GNU General Public License v3.0
23 stars 0 forks source link

Cannot use single quotes `'` outside raw commands. Cannot use escaped double quotes. #8

Open AgainPsychoX opened 2 years ago

AgainPsychoX commented 2 years ago

As I were looking for workaround for #7 , I found it would be hard, since minity does not support single quotes nor escaping double quotes...

Code

?furnace_minecart_name_snbt = "{\"text\": \"Minecart with Furnace\"}" // Syntax/compilation error
?furnace_minecart_name_snbt = '{"text": "Minecart with Furnace"}' // Syntax/compilation error
?furnace_minecart_name_snbt = {"text": "Minecart with Furnace"} // Invalid mcfunction generation, see below 1)

Last line results in invalid substitution, therefore invalid mcfunction generation:

summon minecraft:chest_minecart ~ ~ ~ {CustomDisplayTile:1b,DisplayOffset:6,Tags:["furnace_minecart"],CustomName:"[object Object]",DisplayState:{Name:"minecraft:furnace"}}
kill @s