[]
This commit is contained in:
1 parent
4810d3b998
commit
46d8e8dd33
1 file changed
+6
-2
@@ -258,8 +258,12 @@ public class Auxiliary {
|
||||
));
|
||||
});
|
||||
|
||||
expression.addContextFunction("item_display_name", 1, (c, t, lv)->{
|
||||
return new FormattedTextValue(EntityValue.getItemStackFromValue(lv.get(0)).getDisplayName());
|
||||
expression.addContextFunction("item_display_name", -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());
|
||||
|
||||
});
|
||||
|
||||
expression.addContextFunction("particle_box", -1, (c, t, lv) ->
|
||||
|
||||
Reference in new issue
Block a user