SethBling / cbscript

CBScript for Minecraft
1.13k stars 28 forks source link

Title/subtitle/actionbar colors do not work for non-literals (should be a simple fix). #26

Open fjordimm opened 3 months ago

fjordimm commented 3 months ago

Let's say I have a cbscript variable called 'var'. If I write, for example, actionbar @a "{gVar equals (var)" ... it will transpile into: /title @a actionbar ["",{"text":"Var equals","color":"dark_green"},{"score":{"name":"Global","objective":"var","color":"dark_green"}}]

This will display the 'Var equals' as dark green, but the value of 'var' will be displayed as white. It is easy to fix manually; you just move the color tag outside of the inner curly braces.

This is what it should transpile into: /title @a actionbar ["",{"text":"Var equals","color":"dark_green"},{"score":{"name":"Global","objective":"var"},"color":"dark_green"}]