[]
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)->{
|
expression.addContextFunction("item_display_name", -1, (c, t, lv)->{
|
||||||
return new FormattedTextValue(EntityValue.getItemStackFromValue(lv.get(0)).getDisplayName());
|
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) ->
|
expression.addContextFunction("particle_box", -1, (c, t, lv) ->
|
||||||
|
|||||||
Reference in new issue
Block a user