mojira.dev
MC-280471

The Particle.color field in area effect clouds is read-only

Area Effect Clouds will not use Particle.color even if potion_contents.potion and potion_contents.custom_color are not set.

Previous behavior was to use the color provided by; potion_contents.custom_color, potion_contents.potion, and finally Particle.color

It might still be the same, but Particle.color has become read-only

(One could say itโ€™s probably WAI, and might be a documentation issue, but from what I can tell there is no mention of this in the current snapshot cycle release notes)

Not too sure how to file this, it does seem to be a regression as potionless area effect clouds seems to be intended to be white as default (color:-1), and it will most cause headaches for some datapacks once released.

Itโ€™s also oddly jarring to have one property in Particle be protected

/data merge entity @n[type=minecraft:area_effect_cloud] {Particle:{type:block,block_state:"dirt"}}
/data modify entity @n[type=minecraft:area_effect_cloud] Particle.block_state set value stone

is ok, but not for Particle.color if Particle.type is entity_effect ๐Ÿ™‚

# 1.21.4

/rotate @s 0 0
/summon area_effect_cloud ~ ~0 ~10 {Tags:[0],Radius:3,Duration:9999}
/summon area_effect_cloud ~ ~1 ~10 {Tags:[1],Radius:3,Duration:9999,potion_contents:{custom_color:-65536}}
/summon area_effect_cloud ~ ~2 ~10 {Tags:[2],Radius:3,Duration:9999,Particle:{color:-65536,type:entity_effect}}
# 0:white, 1:red, 2:red

/execute as @e[type=area_effect_cloud] run data modify entity @s Particle.color set value -16711936
# 0:green, 1:red, 2:green

/execute as @e[type=area_effect_cloud] run data modify entity @s potion_contents.custom_color set value -16776961
# 0:blue, 1:blue, 2:blue

# 25w09b

/rotate @s 0 0
/summon area_effect_cloud ~ ~0 ~10 {Tags:[0],Radius:3,Duration:-1}
/summon area_effect_cloud ~ ~1 ~10 {Tags:[1],Radius:3,Duration:-1,potion_contents:{custom_color:-65536}}
/summon area_effect_cloud ~ ~2 ~10 {Tags:[2],Radius:3,Duration:-1,Particle:{color:-65536,type:entity_effect}}
# 0:black, 1:red, 2:black

/execute as @e[type=area_effect_cloud] run data modify entity @s Particle.color set value -16711936
# 0:black, 1:red, 2:black

/execute as @e[type=area_effect_cloud] run data modify entity @s potion_contents.custom_color set value -16776961
# 0:blue, 1:blue, 2:blue

Comments 1

The implemented fix made potion_contents.custom_color correctly update the color.

Summoning with or setting Particle.color does not affect the particle colors as of 1.21.5

Default particle color changed from white to black as of 1.21.5

knirch

gegy

Confirmed

Platform

Normal

Commands

25w09b, 25w10a

25w15a

Retrieved