Scarpet: In `modify(e, 'effect')`, if the `ambient` parameter is specified, it overrides the `showIcon` parameter value.
James103 opened this issue ยท 0 comments
To reproduce, run this command: script run modify(p, 'effect', 'speed', 1000, 1, false, false, true)
Breakdown of parameters in function modify(p, 'effect')
:
- entity is
p
- action is
effect
- effect name is
speed
- effect duration is
1000
- effect amplifier is
1
- effect show_particles is
false
- effect show_icon is
false
- effect ambient is
true
, but that does not apply correctly, instead setting theshow_icon
flag.
Therefore, if the ambient
parameter is specified, it overrides the show_icon
parameter instead of the expected behavior.
As a workaround, run this command: script run modify(p, 'effect', 'speed', 1000, 1, false, false)
Breakdown:
- Same as above
- effect ambient parameter is not specified and defaults to false, allowing the show_icon parameter to work as intended.
Caused by:
fabric-carpet/src/main/java/carpet/script/value/EntityValue.java
Lines 1517 to 1520 in 74f56c1