(Suggestion) For god sake, can we stop with changing the spawn rates.

Discussion in 'Suggestion Box Archives' started by Mrlegitislegit, Mar 14, 2013.

  1. Lag, allegedly.
    melodytune likes this.
  2. True, but we are going to have those new servers soon:p
    PandasEatRamen likes this.
  3. i think if mobs wandered as much as some people want we would have to raise the entity despawn range no? otherwise 200 something mobs in an area would be reduced quickly
  4. I'll believe it when I see it.
    melodytune likes this.

  5. I believe that GIF accurately describes what the reactions of most of the EMC population would be if we had a new server.
  6. I've seen that.

    Have you seen Aikar's sig?

    "<@JustinGuy> When Aikar is done with performance we will be black and white and animals will move like robots" Progress: 50%

    I understand we are getting new servers, but as long as Aikar considers mobs wandering around less important than optimization, I doubt if he'll take what he likely considers a backwards step. New servers or not. I've seen him compromise before though, so who knows. I'll believe it when I see it.

    I'm doing some Googling to verify, but wasn't the mob movement change something Mojang did anyway?
    jkjkjk182 likes this.
  7. even if it wasnt it makes sense think about it: mobs walk out of entity spawn range and either despawn or a new entity spawns then they walk back in and it messes up the algorithm
  8. 5x5 grid lighting - no problems. Takes a bit of effort, but a 100x100 region only requires 400 lights. Also, if you live in the wild permanently - as I do, you can always go mining during darkness ;) (after all that is what the the game's all about) :rolleyes:
    vividOptimism and PandasEatRamen like this.
  9. I often go caving without torches too.

    Is the 5x5 you mention the chess knight's pattern or is it something else?

    I'm not getting it. Can you explain a little more carefully?
  10. eh i dont really understand it too much tbh, the movement causes problems with spawns tho lets just leave it at that lol. chunks get filled quicker cause you moved out of range of one and that one was filled
  11. Well actually, after asking Aikar the boundary is 5 chunks away from the player, which is actually 160 x 160. So it is not as easy as you think
  12. I believe that Aikar has a change that reduces their movement even more than vanilla, much much more. Dark room grinders are very nerfed:/
    Pab10S likes this.
  13. It's way too low now :(
  14. I thought we were already in normal... I saw three skeletons, all next to each other yesterday. I disconnected to do an instant kill of all of the .
    jkjkjk182 and PandasEatRamen like this.
  15. what is the current spawn range for overworld and nether?
  16. your chunk + 5 more in each direction, I have a big post i was writing up last night that will answer some questions ill finish when I get home
  17. Ok so let me try to explain the changes EMC has in place as best as I can

    Entity Activation Range
    Monsters become "Deactive" at 32 blocks in the wild from a player. This matches exactly with the VANILLA change (as mentioned above, yes it was a change from Mojang) that made mobs barely move at 32 block distance.

    However there is a key difference here -- mojangs 32 block check I believe is on a 3d plane, or very least includes Y in the mix.

    So, Mojangs 32 block check is the main thing affecting natural spawn grinders.

    Our change does not have have a Y check, so if any mob is within 32 blocks of you on the X/Z plane, they will be active.

    So our system is less strict, and should only be kicking in when Mojangs would already be kicking in...

    Now, I can look into removing Mojangs checks since ours is better anyways, so that they could move 50 blocks above you. I believe that code is a waste of resources anyways as its very ineffecient in implementation... I just have to track it down again to delete it.

    Mob spawning distance
    Mojang default spawn range is up to 8 chunks, however we have reduced the range to 5 chunks so its 11x11

    If anyone understands code, here is the relevant section:
                    // EMC start - SpawnTickEvent
                    SpawnTickEvent event = new SpawnTickEvent(worldserver.getWorld(), spawnRadius, entityhuman.getBukkitEntity());
                    if (event.isCancelled()) {
                    b0 = event.getSpawnRadius();
                    // EMC end
                    for (int l = -b0; l <= b0; ++l) {
                        for (int i1 = -b0; i1 <= b0; ++i1) {
                            boolean flag3 = l == -b0 || l == b0 || i1 == -b0 || i1 == b0;
                            // CraftBukkit start
                            long chunkCoords = LongHash.toLong(l + k, i1 + j);
    In vanilla, b0 is either 8 or same as view-distance (which ours is 7), so we are only 2 off from vanilla.

    Mob Spawning Limits
    In vanilla, there is a formula for 70 * # of chunks eligible for spawning generated by that above code.

    Ideally, this means 70 mobs per player. But note... thats spread out over 8 wide in vanilla (so 17x17 chunks) - MUCH larger area.

    However, this count is for natural spawns, and is a world total.

    A single user using a spawner grinder will make the world hit the cap, and noone gets natural spawns (remember those days?)

    We stopped that by setting our world cap to like 10,000... But w/o extra code that would of killed us.

    We implemented 2 checks with the entity limiter.

    first: How many mobs are around the player already? If the count is 90 or more, natural spawns will be blocked FOR THAT PLAYER... So a player can not impact another player anymore.

    That is done by simply cancelling the SpawnTickEvent, so that users chunks wont even attempt to spawn (improved performance!)

    If the player is eligible for natural spawning, then the VANILLA CODE runs...

    We do not modify anything dealing with light conditions. The spawning code for distance to player and light level checks are all 100% vanilla as far as I'm aware. I have studied this code, it all looks fine, and spigot nor us has modified it.

    If it passes that check, it fires the normal mob spawn event.

    This spawn is then checked for density - it looks for other mobs nearby the spawn, counts up the total and if there is already too many mobs in the area, we cancel it.

    These density settings are configurable and we can tweak them to find good balance... So please, work with us and remain calm and just inform us when you think it needs tweaking then we can look into it.

    It's very hard to get real world spawning setup in testing.

    The lighting / range check change claims

    As said above, we have not modified this code. There is no way a monster can spawn within 23 blocks of you.

    Now, as for light levels, I mentioned to Jack I think its a Spigot issue...

    Spigot does make modifications to the lighting system of Minecraft, and delays light updates.

    For a while we ran with the random light updates disabled as it improves performance, but I noticed how much it sucked with the black spots and turned it back on.

    The only real thing I can see is that chunks have invalid light data, and mobs are spawning when they shouldnt be.

    Considering I can't find anyn way to reproduce this, which is required in order to fix said problem, and that its pretty rare to happen... noone really has the time to spend trying to look into such a thing. Im sure everyone would much rather me work towards Dragon Tombs instead of spending a week on a rare fluke bug.

    As for claims of AI changes for ranges - none of that has been changed.

    AI is all still vanilla behavior (until we change the stop moving even at 32 Y)

    I will look into items in water... but that should be fixed. ive heard no complaints till now and they worked fine in testing too.
    ZBSDKryten, adsingh, Yamanqui and 2 others like this.
  18. Mobs seem a lot more dense in EMC and now I know why, you have 20 more mobs trying to be spawned into a smaller area.
  19. So we should have the same rates as in a vanilla singleplayer world for darkroom grinders? Also, last time i checked (few days ago), the issue of items in the water was not fixed. In my setup, the items are directly shot into the water every time so none land on any block.