In previous versions you could summon an area effect cloud that would not disappear for a very long time with:
/summon area_effect_cloud ~ ~ ~ {CustomNameVisible:1b,Duration:2147483647}
Where 2147483647
is the max integer. However since 1.21.5, these AEC’s disappear after a tick.
It seems like this happens whenever Duration
is 2147483628
or higher. As soon as you set it to 2147483627
, the AEC stays in the world with the set Duration
and its Age
starts counting upwards.
Code analysis
This is happening because AreaEffectCloud#serverTick
uses the code this.tickCount >= this.waitTime + this.duration
where this.waitTime
(WaitTime
in NBT) defaults to 20
and causes this comparison to overflow.
Notice that when setting WaitTime
to 0
, the AEC stays in the world:
/summon area_effect_cloud ~ ~ ~ {CustomNameVisible:1b,Duration:2147483647,WaitTime:0}
Comments 0
No comments.