Well I was creating custom mob spawners using command blocks and it was going great. I really love all the options and variety you can get out of them. Anyway, the only thing that didn't work was "RequiredPlayerRange". I was trying to create a spawner that only had a 3 block range so you'd have to walk immediately beside the glass wall it was behind to get it to activate. But it was staying at the default (16 I think). I even opened the level up on an external map editor to eyeball the current values and sure enough everything I set was what it was supposed to be except RequiredPlayerRange. I can change it with that map editor so I'm alright but it still needs fixing. And yes, I was exact about the spelling of RequiredPlayerRange. I must've eyeballed that code for small spelling mistakes 10 times before giving up and admitting it wasn't a mistake on my end.
Steps to Reproduce:
On a single player map with cheats enabled and creative on, give yourself a Command Block ("/give @p 137"), set it down, and program the following code:
/setblock ~0 ~0 ~-3 mob_spawner 0 replace {EntityId:Blaze,SpawnRange:2,MinSpawnDelay:100,MaxSpawnDelay:200,SpawnCount:4,RequiredPlayerRange:3}
Only the last of those tags matters of course but I thought I should include the exact code I used just in case there's something I've overlooked.
Linked issues
duplicates 1
Comments 4
yeah the room I was in was about 10 wide and I had my back against the far wall. They were still spawning (default is 16, where I was would've been around 13 away)
well I'm glad I'm nerdy enough to browse similar problems for idle reading. Found this in MC31115 :
Le Groignec Nicolas added a comment - 26/Sep/13 6:19 PM
If you want to use the tag "RequiredPlayerRange" you must write the "MaxNearbyEntities" tag too. It's the same things for the " MaxSpawnDelay", you must write the "MinSpawnDelay".
Both of these tags are linked, they are ignored if their counterpart is not specified.
OK so, I can sort of confirm this... would like to know if you are experiencing the same thing that I witnessed.
Using the setblock command in the description the mob spawner itself seems to function as you designed it, however... there seems to be a visual glitch where the spawner appears to be active when it is not. As far as I can tell this seems to be an unlimited range where it appears to be active but does not actually spawn anything.
Can you confirm if you are within a couple blocks range that you do get spawns? Outside of the 3 block range you should not.