mojira.dev
MC-312163

Passive mob spawns ignore y-level

When trying to spawn hostile mobs, a sphere of 128 radius is checked around a player for possible spawn locations, however, passive mobs don’t follow the same logic, instead ignoring the Y-level of the player.

How to reproduce:

  • In a superflat world with the following settings:

    • Gamemode: Creative

    • Difficulty: Peaceful

    • Allow commands: On

    • Generate structures: Off

  • Run ‘/gamerule mob_drops false’ (This stops new entities being created on mob death)

  • Start flying, then run ‘/tp ~ ~10000 ~’

  • Run ‘/kill @e[type=!minecraft:player]’

    • This should kill some mobs

  • Run ‘/tick sprint 1d’

  • When tick sprint is done, run ‘/execute as @e[type=!minecraft:player] run data get entity @s Pos’ check what mobs spawned and their positions in world

Expected result:

No mobs are found when running ‘/execute as @e[type=!minecraft:player] run data get entity @s Pos’, as player position is already well over 128 blocks away from any valid spawning location

Actual result:

Up to 10 passive mob positions are printed in the chat

Comments 0

No comments.

Figus

(Unassigned)

Unconfirmed

26.4 Snapshot 1

Retrieved