Minecraft – way to freeze the mob inside a spawner

minecraft-commandsminecraft-java-edition

The question is pretty straight forward. Is there a way to freeze the mob inside the spawner.

I think before 1.13 you could do RequiredPlayerRange:0s. Well, that's not working anymore (1.15) Is this a bug that has been patched?

Thanks in advance.

Best Answer

I figured it out.

/data merge block (coords) {RequiredPlayerRange:0s}

This does not work with /setblock directly (MC-80690, so either /data merge command still needs to be run after a /setblock command or MaxNearbyEntities needs to be given as well, like this:

/setblock (coords) spawner{RequiredPlayerRange:0s,MaxNearbyEntities:0}