gnembon / fabric-carpet

Fabric Carpet
MIT License
1.73k stars 275 forks source link

Infinite duration effects (1.19.4) #1840

Closed mageowl closed 10 months ago

mageowl commented 1 year 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?

17183248569 commented 1 year 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 10 months ago

This was introduced in 1.4.128 and #1844.