gnembon / scarpet

Public Repository of scarpet programs for Minecraft
Creative Commons Zero v1.0 Universal
359 stars 162 forks source link

create rjson.scl #337

Open 17183248569 opened 2 years ago

17183248569 commented 2 years ago

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

Ghoulboy78 commented 2 years ago

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