[MC-1004] Custom spawners with no delay variance crash the game Created: 28/Oct/12  Updated: 07/Apr/21  Resolved: 29/Oct/12

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.2
Fix Version/s: Minecraft 1.4.3

Type: Bug
Reporter: GrygrFlzr Assignee: [Mojang] Nathan Adams
Resolution: Fixed Votes: 0
Labels: crash, delay, random, spawner
Environment:

Windows 7 64 bit, JRE 7 1.7.0_07 64 bit.


Attachments: Text File crash-2012-10-28_18.06.42-server.txt    
Confirmation Status: Unconfirmed

 Description   

I was trying to modify my custom map to have a set delay in spawning entities. Timing is important, so even a 1 tick delay makes a difference. So I modified the spawner to have exactly the same minimum and maximum delay.

What I expected to happen was to have a spawner that could spawn using exact timing and would not randomize the amount of time needed to spawn the next entity.

What actually happened was the spawner crashed the game because the randomizer could not accept 0 as a difference between values.

Steps to reproduce:
1. Place a spawner in Minecraft.
2. Open MCEdit and use the Change Spawners filter, modify the values of the minimum and maximum delay to the same amount (doesn't need a specific value). Save the world.
3. Open the world in Minecraft and go into the detection range of the spawner. You will receive a crash report. (I have included mine as an attachment)

Temporary Workarounds
If the delay difference has a difference even by 1 tick, it will work as intended. However, I need my map to spawn the entities at that exact rate, or it will not work. Thus this workaround is useless for me.

Possible fixes
Use an if-else statement to check if the delay difference is 0, and if so, skip the randomizer and use that delay instead.



 Comments   
Comment by Dustin Dowell [ 02/Nov/12 ]

Sorry about that. I wasn't aware. I saw MCEdit and assumed it wasn't vinilla. Sorry.

Comment by Alex Campbell [ 02/Nov/12 ]

The ability to set these properties on spawners was a deliberate feature in 1.4.

If a feature doesn't work as intended, that's a bug.

Comment by Dustin Dowell [ 02/Nov/12 ]

I'm pretty sure since this can't be created in vinilla minecraft only, it's not considered a bug here. Sorry.

Comment by Alex Campbell [ 02/Nov/12 ]

It seems the max spawn delay is actually 1 tick lower than what you set it to in 1.4.2, so if you set the maximum to the minimum + 1, there will be no variance.

Generated at Sun Jan 12 11:52:59 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.