The bug
The server crashes when executing /damage
on a Guardian a couple of times using a command block, with the same mob also being as its source of the damage.
The crash does not happen when executing through chat, instead the command itself will just not work at all, as if you have never typed it in the first place.
Also happens with Elder Guardians, including Elder Guardians doing /damage
to Guardians and vice versa.
Steps to reproduce
Create a new world without experiments enabled
Locate an ocean monument and teleport there
Place a command block with this command:
damage @e[type=guardian,limit=1] 1 generic by @e[type=guardian,limit=1]
Activate the block multiple times
→ ❌ The server eventually encounters a stack overflow error and crashes, along with the game if done on singleplayer
Stack trace
23w07a\: [^crash-2023-02-19_19.51.11-server.txt]
Description: Executing command block
java.lang.StackOverflowError: Executing command block
at acl.a(SourceFile:117)
at bvv.fQ(SourceFile:133)
at bvv.a(SourceFile:344)
at bvv.a(SourceFile:349)
at bvv.a(SourceFile:349)
at bvv.a(SourceFile:349)
at bvv.a(SourceFile:349)
at bvv.a(SourceFile:349)
at bvv.a(SourceFile:349)
at bvv.a(SourceFile:349)
at bvv.a(SourceFile:349)
at bvv.a(SourceFile:349)
...
Linked issues
relates to 1
Attachments
Comments 5
If you overwrite tags/damage_type/avoids_guardian_thorns
and remove thorns
from its values, this issue still reproduces in 1.19.4 Pre-release 1.
@@unknown, I can't reproduce.
This is the data package I use:
[media]
avoids_guardian_thorns.json
{
"values": [
"minecraft:magic",
"#minecraft:is_explosion"
]
}
Tags are merged with the file of the same resource location from the previously loaded datapack by default, so you need to set replace
to true
to remove thorns
.
Anyway, I have created a new report MC-260579.
avoids_guardian_thorns.json
{
"replace": true,
"values": [
"minecraft:magic",
"#minecraft:is_explosion"
]
}
This happens because guardians are trying to damage themselves with their own thorns, which themselves trigger the thorns, and so forth.