is that ok now?

This commit is contained in:
ch-yx authored and gnembon committed 2022-08-28 18:59:11 +02:00
1 parent 247835386e
commit 5e5ce6f7d3
2 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -268,8 +268,8 @@ Example usages:
// not a problem in apps
</pre>
### `item_display_name(item, hasbracket?)`
returns the `display_name` of the item as a Text Value. if hasbracket is true, there will be a bracket around it.
### `item_name_text(item )`
returns the name of the item as a Text Value.
### `display_title(players, type, text?, fadeInTicks?, stayTicks?, fadeOutTicks),`
@@ -258,10 +258,10 @@ public class Auxiliary {
));
});
expression.addContextFunction("item_display_name", -1, (c, t, lv)->{
if(lv.size()==1 || lv.get(1).getBoolean()){
expression.addContextFunction("item_name_text", -1, (c, t, lv)->{
/*if(lv.size()==1 || lv.get(1).getBoolean()){
return new FormattedTextValue(EntityValue.getItemStackFromValue(lv.get(0)).getDisplayName());
}
}*/
return new FormattedTextValue(EntityValue.getItemStackFromValue(lv.get(0)).getHoverName());
});