The ranged attack of Warden could cause damage whose type is sonic_boom
. But in fact, EntityDamageCause
does not contain "sonic_boom"
. So if you subscribe the EntityHurtEventSignal
and try to get the EntityHurtEvent.cause
(until 1.19.60.25) or EntityHurtEvent.damageSource.cause
(after 1.19.60.25) in the callback, instead of returning "sonic_boom"
, it will return undefined
.
It it worth noting that you can only cause this type of damage by using minecraft:behavior.sonic_boom
component. Because although the cause
parameter of minecraft:hurt_on_condition
component and minecraft:area_attack
component accepts "sonic_boom"
, it actually uses "none"
to do damage. But in blocks and items, the type
parameter of damage
event response does not accepts "sonic_boom"
at all. /damage
command does not support "sonic_boom"
as well.
What is more, damage_sources
parameter of minecraft:behavior.panic
component and minecraft:behavior.play_dead
component does not accept sonic_boom
either.
Entity.applyDamage
, which is added in 1.19.60.25, can apply certain type of damage to entity by passing EntityDamageSource.cause
. However, "sonic_boom"
is still unavailable and will throw an error (TypeError: Native optional type conversion failed).
Interestingly, if you try to use sonic_boom
in minecraft:damage_sensor
component (both of has_damage
entity filter and cause
parameter of trigger), you will find it working properly.
In summary, the table below will show all the problems.
name | type | status quo | expectation | note |
---|---|---|---|---|
| Enumeration (SAPI) |
|
| - |
| Function (SAPI) |
| apply | the
|
| String? (SAPI) |
|
| the ranged attack from Warden |
| Entity Component (Data Driven) | apply | apply | the |
| Entity Component (Data Driven) |
| get panicked after receiving | the |
| Entity Component (Data Driven) |
| play dead after receiving | the |
| Entity Component (Data Driven) | apply | apply | the |
| Blocks/Items Event Response (Data Driven) |
| apply | the |
| Command |
| apply | the |
Linked issues
Attachments
Comments 4
Thank you for your report!
However, this issue has been temporarily closed as Awaiting Response.
Could you please attach an example behavior pack where this issue can be observed?
This ticket will automatically reopen when you reply.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📓 Project Summary – 📧 Suggestions – 📖 Minecraft Wiki
But as the Description shows, this can be easily reproduced without any behavior pack, just using /damage command.
For example:
/damage @s 1 ...
Note that there's no sonic_boom in the autocompletion list.
Run /damage @s 1 sonic_boom
Note that a parsing error occurs.
We do not have enough information to reproduce this issue.
I can no longer reproduce the issue with the /damage command. Is this still an issue as of the latest version/Preview? If so, then please include the following information to help us understand your problem:
Steps to Reproduce:
1. (Explain what needs to be done for the issue to happen)
2.
3.Observed Results:
(Briefly describe what happens)Expected Results:
(Briefly describe what should happen)
Please also attach any needed commands, add-ons/behavior packs, data packs, resource packs, screenshots, videos, or worlds needed to help reproduce this issue.
Refer to the Bug Tracker Guidelines for more information about how to write helpful bug reports. Bug reports with insufficient information may be closed as Incomplete.
This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
I can confirm this. As a new damage type, sonic_boom is still not supported by various technical contents.