mojira.dev
MC-178111

The predicate condition damage_source_properties is not functional

The bug

Targeting an entity using a predicate that contains the damage_source_properties condition simply doesn't work.

I tried the following commands in both repeating command blocks and datapack tick functions:

execute as @e[predicate=predicate_path] run say hit
{
  "condition": "minecraft:damage_source_properties",
  "predicate": {
    "is_fire": false
  }
}

 

execute as @e[predicate=predicate_path,nbt={HurtTime:10s}] run say hit
{
  "condition": "minecraft:damage_source_properties",
  "predicate": {
    "is_fire": false
  }
}

 

execute as @e[predicate=predicate_path] run say hit
{
  "condition": "minecraft:entity_properties",
  "entity": "this",
  "predicate": {
    "nbt": "{HurtTime:10s}"
  },
  "condition": "minecraft:damage_source_properties",
  "predicate": {
    "is_fire": false
  }
}

After hitting mobs, I didn't get any sort of response. I tried all kinds of damage types, but didn't get any feedback, and nothing was logged. If you try it yourself, you'll find that the damage_source_properties selector simply doesn't work. I've confirmed that most other predicate conditions are functional - it only seems to be an issue with this one.

Linked issues

Attachments

Comments 38

Confirmed in 20w19a.

Confirmed in 20w20b.

Confirmed in 20w21a.

Confirmed in 20w22a.

Pretty sure this would be WAI. Use advancements.

28 more comments

No it can't. Advancements only work with players. The report mentions @e. The missing functionality of this predicate is a bug - the predicate was not implemented as intended, causing it to fail in the 99% of cases where it was originally going to be used. It's only by design insofar as the design was cut by 99%, and the remaining 1% of usability was left.

On a separate note, even the most egregious technical bugs and shortcomings never get fixed so long as they don't affect vanilla gameplay, so you let go of any hope this will ever work as intended and wait for a workaround.

Where is your proof/evidence that it wasn't implemented as intended? It already appears clear that it was implemented correctly/as they intended, because everything related here has various contexts that they work under and ones that they do not. Just because you or others can't personally use it how you want to does not make it a bug or unintended. It's use first and foremost was only for the given contexts that it currently works with. This is not a valid bug report, it is a feature request.

It’s been years since I bumped this report and looked into this issue, and “others” you refer to is what I meant by 99% of its usability. If you Google this predicate all that comes up is people asking why it doesn’t work.
Again, it’s been years since I looked into it and can’t be bother to pull it up because nothing will have this bug fixed. Team collision rules have been reversed since introduction, there’s a code correction on the report page, and no one cares enough to fix it. The tech team doesn’t give a damn about bugs.
On second thought having this be a feature request has a higher chance of it making it into the game than a bug fix.

There've been plenty of fixes for the technical aspect of Minecraft, but you must understand that 90% of the things reported about it are user mistakes, and out of the other 10%, the issue is either not fully clear, or not that simple to reproduce.

This is not a forum though, so futher discussion needs to go on reddit or the mojira discord.

This is a feature request. `damage_source_properties` checks properties of the killing blow

Surviving Te

(Unassigned)

Community Consensus

Platform

Normal

Commands, Data Packs

1.15.2, 20w15a, 20w19a, 20w20b, 20w21a, ..., 1.16.5, 21w17a, 21w19a, 1.19.4, 23w12a

Retrieved