Closed ColinTimBarndt closed 1 year ago
The following example does not compile because the selector only accepts strings. It would be nice to be able to use selectors in JSON Text Components without appending .toString(). This is already implemented for score components.
.toString()
import { Selector, MCFunction, tellraw } from 'sandstone' MCFunction('hello', () => { const closest = Selector('@p', {distance: [.1, Infinity]}) tellraw(Selector('@a'), { text: 'My closest friend is ', extra: [ { selector: closest } ] }) })
Also, the selector component is missing the optional "separator" property, which is very useful.
Reference: https://minecraft.fandom.com/wiki/Raw_JSON_text_format#Entity_Names
Duplicate of #172
The following example does not compile because the selector only accepts strings. It would be nice to be able to use selectors in JSON Text Components without appending
.toString()
. This is already implemented for score components.