gnembon / fabric-carpet

Fabric Carpet
MIT License
1.65k stars 261 forks source link

Infinite duration effects (1.19.4) #1840

Closed mageowl closed 5 months ago

mageowl commented 7 months ago

In 1.19.4 the ability to add infinite duration to an effect was added. modify(e, 'effect') should reflect that, perhaps passing true as the duration = infinity?

ch-yx commented 7 months ago

the game use -1 to represent infinity.

to query it , scarpet could return -1 normally. but when i want to modify it, <=0 will remove the effect...

https://github.com/gnembon/fabric-carpet/blob/master/src/main/java/carpet/script/value/EntityValue.java#L1486

altrisi commented 5 months ago

This was introduced in 1.4.128 and #1844.