is that ok now?
This commit is contained in:
1 parent
247835386e
commit
5e5ce6f7d3
2 files changed
+5
-5
No files matched your search
@@ -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());
|
||||
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user