Attempting to remove the beam_target
tag from an End Crystal returns "Modified entity data of End Crystal" but does not in fact remove the tag. (prior to 24w06a, removing BeamTarget instead reset its X, Y, and Z values to 0, but likewise did not remove the data).
Steps to reproduce:
/summon end_crystal ~ ~ ~
/data merge entity @e[type=end_crystal,limit=1,sort=nearest] {beam_target:[I; 100, 100, 100]
}/data remove entity @e[type=end_crystal,limit=1,sort=nearest] beam_target
/data get entity @e[type=end_crystal,limit=1,sort=nearest]
Notice the beam still exists, and the NBT still shows the beam_target
unchanged, despite the command returning successful. Other methods to remove the data, such as /data merge
, likewise have no effect.
The only way currently to "remove" the beam_target
tag is to delete the entity altogether and re-summon an identical one in its place, sans target data, which is not ideal as this causes a noticeable jump in animation when the entity is replaced.
Related issues
is duplicated by
relates to
Comments

That's true but why would the game rewrite it rather than remove the beam animation? Seems unintuitive.

/data remove
does actually remove the tag. The primary issue comes from the fact that the crystal does not wipe out its current in-memory beam target before setting it via NBT. However, any issues arising from editing an entity during its lifetime are closed as invalid. But to explain this particular issue further:
For the first one: the compound is indeed removed entirely. However, since the crystal does not wipe out its in-memory beam target first when merging NBT data, it will remain. It will only manipulate its beam target from NBT if the BeamTarget
compound is specified, which won't be the case with /data remove
. /data get
is writing the entity anew to NBT, so its original beam target is included since it wasn't removed.
For the second one: removing a specific child does work, but the game is getting a very specific collection of positional data for BeamTarget
, where any missing keys will default to 0.
As far as removing the beam target, you can try this work-around:
/data merge entity @e[type=minecraft:ender_crystal,limit=1] {BeamTarget:{X:2147483647}}
The X
value is set to max int. This doesn't stop the beam from trying to render, but it should hopefully be too large of an offset to see it. You may experience anomalies (such as lines appearing on the screen depending on camera angle), though with that value I personally did not.
Reopened for Mojang to decide.
Other things similar to this have been fixed or triaged already.
Can confirm in 20w48a.
Can confirm in 20w51a.
Can confirm in 21w03a.
Can confirm in 21w05b.
Can confirm in 21w06a.

Can confirm in 1.17.1.

Confirmed for 1.17.1
Can confirm in 1.18.1.
Can confirm in 1.18.2.

Can confirm in 22w15a.

In 1.19 Pre-release 2
Can confirm in 1.19.

In 23w33a.

As of 24w11a, possibly earlier (given the tag changes were made in 24w06a), /data remove
no longer "zeroes" beam_target, but it still doesn't remove it either. So I would say that this does affect 24w11a, but that some of the details may need to be updated.
@unknown: I made you the reporter because the current reporter was last active in 2017. You can make any necessary changes to the summary and description, and keep the report up to date.

when i made this report in 2017, i didn't expect people to maintain it for 7 years
i could've blocked the emails, but i didnt because i was kindof curious how long it would go on
thank you all for putting more work into this than i could've imagined
Removing the tag won't stop the game from rewriting it again.