mojira.dev
MC-18131

Hostile mobs spawned from spawn eggs in peaceful will be in the world for a short moment

The bug

When in peaceful mode, spawning a hostile mob with a spawn egg will cause the mob to spawn in the world for a split second, activating redstone and other things mobs can do.

How to reproduce

  1. Set up a tripwire in peaceful mode

  2. Spam-spawn a hostile mob on top of it
    → The mob will activate the tripwire and then disappear

Note

This was said to be fixed in 13w24b with mob spawning in multiplayer, but will still happen from eggs in both singleplayer and multiplayer. When a player uses a spawn egg with a hostile mob in peaceful, a check for difficulty should occur in the code before the mob is actually spawned. If it cannot be spawned, usage should fail.

Linked issues

Attachments

Comments 14

Confirmed.

Still occurs in MC 1.6.2

Confirmed for 14w11b, 1.7.5 and 1.7.9

Confirmed for 15w47b

Confirmed for 1.13.1.

4 more comments

Can confirm in 21w05b.

Can confirm in 21w06a.

Can confirm in 21w07a. Video attached.

Can confirm in 1.17.

Can confirm in 1.17.1 Pre-release 3.

Darth_Feder

muzikbike

(Unassigned)

Confirmed

(Unassigned)

Minecraft 1.5.1, Minecraft 1.5.2, Snapshot 13w23b, Snapshot 13w24b, Snapshot 13w25a, ..., 21w20a, 1.17 Pre-release 1, 1.17, 1.17.1 Release Candidate 1, 1.17.1

Retrieved