mojira.dev
MCPE-168130

Mobs with "minecraft:damage_sensor" can't be attack properly.

The words below are nonsense.Just get into the world and hit the zombie with diamond sword constantly.

It is expected that the damage amount is 4 each time I hit,and in the next 0.5s,any attacks is invalid.

But in fact I will hit it with the damage of 4 2 1 1 without any gap.Then I can receive a 0.5s gap. (The video below explain the bug clearier)

Further experiment show that the once you attack the mob,the game will add up all the damage you appeal to it after the 0.5s gap before.Then the game subtract the summary from your attack mount.If the number is greater than 0,it appeal the number as damage,else it creat another 0.5s gap.

The logic of this algorithm is strange!

Linked issues

Attachments

Comments 3

What is the code of the damage_sensor component you are using? What happens if you remove the damage_sensor component?

The add-on is in the world.The code of damage sensor is like this:
"minecraft:damage_sensor": {
                "triggers": [
                    {
                        "damage_multiplier": 0.5,
                        "deals_damage": true
                    }
                ]
            }
Remove this can fix the problem,set the damage_multiplier no less than 1 can "fix" the problem too.But there is a problem,whether or not I use this component.

I have determined that we are already tracking this issue at MCPE-167651. Please vote for that issue and watch it for updates.

yang0102357

(Unassigned)

Unconfirmed

Windows

1.19.63

Retrieved