A marker's data tag can be shared among multiple markers
The bug
A marker's data tag can be shared among multiple markers.
When an entity teleports to another dimension, the entity in the current dimension is removed and its copy is created in the destination dimension. If you teleport an entity to multiple dimensions, you can create the corresponding number of copies of it. When the teleport target is a marker entity, data tag sharing occurs among the copies because a marker's data tag is not copied on serialization.
How to reproduce
- Enable the datapack in Attachments.
- Execute
/function mc-223382:init
- Execute
/debug function mc-223382:run
→
Markers' data tags are modified by modifications to other markers. The markers e2 and e3 are now in a shared state, and any modifications to one's data tag will be reflected in the other.
Created Issue:
A marker's data tag can be shared temporarily between two markers
The bug
A marker's data tag is not copied on serialization/deserialization. That allows us to temporarily observe the shared state of the data tag between the marker to be removed in the origin dimension and the marker created from the original one in the destination dimension.
How to reproduce
- Enable the datapack in Attachments.
- Execute
/function mc-:init- Execute
/debug function mc-:runDebug trace
- On line 53:
[M] Marker has the following entity data: [0, 1]→
The new marker's data is modified by the modification to the old one.
- On line 63:
[M] Marker has the following entity data: [0, 1, 2]→
The old marker's data is modified by the modification to the new one.
The bug
A marker's data tag is not copied on serialization/deserialization. That allows us to temporarily observe the shared state of the data tag between the marker to be removed in the origin dimension and the marker created from the original one in the destination dimension.
How to reproduce
- Enable the datapack in Attachments.
- Execute
/function mc-223382:init- Execute
/debug function mc-223382:runDebug trace
- On line 53:
[M] Marker has the following entity data: [0, 1]→
The new marker's data is modified by the modification to the old one.
- On line 63:
[M] Marker has the following entity data: [0, 1, 2]→
The old marker's data is modified by the modification to the new one.
The bug
A marker's data tag is not copied on serialization/deserialization. That allows us to temporarily observe the shared state of the data tag between the marker to be removed in the origin dimension and the marker created from the original one in the destination dimension. For a detailed explanation of the reproduction steps, see the comments in the datapack (mc-223382.zip) in Attachment.
How to reproduce
- Enable the datapack in Attachments.
- Execute
/function mc-223382:init- Execute
/debug function mc-223382:runDebug trace
- On line 53:
[M] Marker has the following entity data: [0, 1]→
The new marker's data is modified by the modification to the old one.
- On line 63:
[M] Marker has the following entity data: [0, 1, 2]→
The old marker's data is modified by the modification to the new one.
The bug
A marker's data tag is not copied on serialization/deserialization. That allows us to temporarily observe the shared state of the data
tag between the marker to be removed in the origindimensionandthemarker created from the original one in the destination dimension. For a detailed explanation of the reproduction steps, see the comments in the datapack (mc-223382.zip) in Attachment.How to reproduce
- Enable the datapack in Attachments.
- Execute
/function mc-223382:init- Execute
/debug function mc-223382:runDebug trace
- On line 53:
[M] Marker has the following entity data: [0, 1]→
The new marker's data is modified by the modification to the old one.
- On line 63:
[M] Marker has the following entity data: [0, 1, 2]→
The old marker's data is modified by the modification to the new one.
The bug
A marker's data tag can be shared among multiple markers.
When an entity teleports to another dimension, the entity in the current dimension is removed and its copy is created in the destination dimension.
If you teleport an entity to multiple dimensions, you can create the corresponding number of copies of it.
When the teleport target is a marker entity, data tag sharing occurs among the copies because a marker's data tag is not copied on serialization.How to reproduce
- Enable the datapack in Attachments.
- Execute
/function mc-223382:init- Execute
/debug function mc-223382:run
- init.mcfunction
# Load the chunks to store markers. execute in minecraft:overworld run forceload add 0 0 execute in minecraft:the_nether run forceload add 0 0 execute in minecraft:the_end run forceload add 0 0Debug trace
The bug
A marker's data tag can be shared among multiple markers.
When an entity teleports to another dimension, the entity in the current dimension is removed and its copy is created in the destination dimension.
If you teleport an entity to multiple dimensions, you can create the corresponding number of copies of it.
When the teleport target is a marker entity, data tag sharing occurs among the copies because a marker's data tag is not copied on serialization.How to reproduce
- Enable the datapack in Attachments.
- Execute
/function mc-223382:init- Execute
/debug function mc-223382:run
- init.mcfunction
# Load the chunks to store markers. execute in minecraft:overworld run forceload add 0 0 execute in minecraft:the_nether run forceload add 0 0 execute in minecraft:the_end run forceload add 0 0Debug trace
The bug
A marker's data tag can be shared among multiple markers.
When an entity teleports to another dimension, the entity in the current dimension is removed and its copy is created in the destination dimension. If you teleport an entity to multiple dimensions, you can create the corresponding number of copies of it. When the teleport target is a marker entity, data tag sharing occurs among the copies because a marker's data tag is not copied on serialization.
How to reproduce
- Enable the datapack in Attachments.
- Execute
/function mc-223382:init- Execute
/debug function mc-223382:run→
Markers' data tags are modified by modifications to other markers. The markers e2 and e3 are now in a shared state, and any modifications to one's data tag will be reflected in the other.
A marker's data tag can be sharedtemporarily between twomarkersA marker's data tag can be shared among multiple markers
Fixed in 21w16a. Markers' data tags are now copied on serialization.