scarpet icon indicating copy to clipboard operation
scarpet copied to clipboard

create rjson.scl

Open ch-yx opened this issue 2 years ago • 1 comments

the function format() is too weak. so i create this scl to improve it.

define: text-like value: entity, string, text, [will allow item after item_display_name is added]

usage: import('rjson',...import('rjson'))

added functions: fset_color/font/insertion/click/format(text-like value to be edit, value) translate(key, ...with(text-like values)) keybind(key) hovertext(text-like value as base,text-like value as hover)

examples: translate('chat.type.text',player,text);

x=''+fset_color('eee','red')+fset_insertion(format('e eee'),'click!');
print(hovertext(x,x))

图片

print(fset_font(keybind('key.inventory'),'alt')) //print e in enchanting table font

ch-yx avatar Aug 13 '22 14:08 ch-yx

Converting this to draft since it's waiting on a fabric-carpet pr

Ghoulboy78 avatar Aug 13 '22 15:08 Ghoulboy78