The bug
When you summon a monster, it does not only flash, but also really exists for one tick. This may cause unnecessary CPU usage because the pathfinding algorithm maybe already starts.
How to reproduce
Set difficulty to peaceful
Place a command block with this command:
/summon zombie ~ ~1 ~
Place a chain command block after it with this command:
/execute if entity @e[type=minecraft:zombie,distance=..4] run say ZOMBIE DETECTED
Activate the first command block
β β Observe how the command block said "ZOMBIE DETECTED"
Linked issues
is duplicated by 4
relates to 2
Attachments
Comments 24
Intended, also if this is a peaceful world, why would you wan't to summon aggressive mobs?
I think they won't naturally spawn with the difficulty on peaceful.
But there should be still some code which checks first if the difficulty is not peaceful I guess and only then summon a zombie (or any other monster) π
Confirmed for 1.13.1. Since /testfor is gone, i'll comment a updated version on how to test it, please copy/paste or link this in the description.
How to reproduce
Set difficulty to peaceful.
Make a chain of two command blocks, first one command block:Β /summon Zombie ~ ~1 ~ make it repeat, second command block, make it chain with this command:Β /execute if entity @e[type=minecraft:zombie,limit=4] run say ZOMBIE DETECTED
Place a lever on the repeat command, active it.
Observe how it will spam chat with 'ZOMBIE DETECTED'
Seems to have been fixed for commands, but not for spawn eggs. Edit: new ticket is MC-300057.
i think this is intended