Mobs that can be ridden and are equipped with an elytra do not sustain damage when gliding against a wall while under player control
Let's first clarify what controlling an entity means. Utilizing
/execute on controller
enables the identification of the entity's controller. You are the controller of a mob under the following conditions:
- For horses, donkeys, mules, zombie horses, skeleton horses, and camels, you become the controller if you ride it, the entity is tamed, and has a saddle.
- For pigs, you become the controller if you ride it while it's saddled and hold a carrot on a stick.
- For striders, you become the controller if you ride it while it's saddled and hold a warped fungus on a stick.
When you control these mobs, they are not affected by the damage type "minecraft:fly_into_wall." However, if they are not under your control, they will incur the expected damage from such collisions.
Steps to reproduce with horse
- Play in a flat world for easier reproduction
/fill ~1 ~ ~ ~10 ~40 ~ minecraft:netherite_block
- Start flying in creative mode if you haven't already
/tp ~5 ~30 ~30
/summon horse ~ ~ ~ {FallFlying:1b,Tame:1b,Rotation:[180F,0F],ArmorItems:[{},{},{id:"minecraft:elytra",Count:1b},{}],SaddleItem:{id:"minecraft:saddle",Count:1b}}- Mount the horse
- Control the horse to glide against the wall
- Notice that the horse does not take damage upon collision with the wall
- Go back to where you executed step 5
/summon horse ~ ~ ~ {FallFlying:1b,Tame:1b,Rotation:[180F,0F],ArmorItems:[{},{},{id:"minecraft:elytra",Count:1b},{}]}- Mount the horse
- Wait for the horse to glide against the wall
Observed behavior: When you control the horse with a saddle, it does not sustain damage upon colliding with a wall. Conversely, when not under your control, the horse incurs the expected damage from such collisions.
Expected behavior: Even when controlled by the player, the horse should be susceptible to damage when colliding with a wall.
Steps to reproduce with pig
- Play in a flat world for easier reproduction
/fill ~1 ~ ~ ~10 ~40 ~ minecraft:netherite_block
- Start flying in creative mode if you haven't already
/tp ~5 ~30 ~30
/summon minecraft:pig ~ ~ ~ {Saddle:1b,FallFlying:1b,Rotation:[180F,0F],ArmorItems:[{},{},{id:"minecraft:elytra",Count:1b},{}]}- Mount the pig
- Hold a carrot on a stick
- Control the pig to fly against the wall
- Notice that it doesn't take damage when colliding with the wall
- Go back to where you executed step 5
- Run the following command (same as step 5):
/summon minecraft:pig ~ ~ ~ {Saddle:1b,FallFlying:1b,Rotation:[180F,0F],ArmorItems:[{},{},{id:"minecraft:elytra",Count:1b},{}]} - Mount the pig
- Wait for the pig to fly against the wall and don't hold a carrot on a stick
Observed behavior: When controlled with a carrot on a stick, the pig does not incur damage upon colliding with a wall. However, when not controlled with a carrot on a stick, it does sustain the expected damage from such collisions.
Expected behavior: Even when controlled with a carrot on a stick, the pig should still take damage when colliding with a wall.
2024-05-30, 09:38 PM
2024-07-12, 07:13 AM
0
0
-