rename it to item_display_name
This commit is contained in:
1 parent
6466bf3f5b
commit
3f91c3b5cd
2 files changed
+2
-5
No files matched your search
@@ -268,7 +268,7 @@ Example usages:
|
||||
// not a problem in apps
|
||||
</pre>
|
||||
|
||||
### `item_name_text(item )`
|
||||
### `item_display_name(item )`
|
||||
returns the name of the item as a Text Value. `item` should be a list of `[item_name, count, nbt]`, or just an item name.
|
||||
|
||||
|
||||
|
||||
@@ -258,10 +258,7 @@ public class Auxiliary {
|
||||
));
|
||||
});
|
||||
|
||||
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());
|
||||
}*/
|
||||
expression.addContextFunction("item_display_name", -1, (c, t, lv)->{
|
||||
return new FormattedTextValue(EntityValue.getItemStackFromValue(lv.get(0)).getHoverName());
|
||||
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user