AFK Kicking

Started by TarynMai, July 31, 2012, 10:02:17 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

TarynMai

Ivy2112 posted a helpop that it was insanely laggy where he was, and when I teleported to him, I was running at 0 fps until I crashed (did this 3-4 times). We realized that someone had afk'd at a spawner for over 2 hours. I'm not even fully sure now many mobs were there, but it was at least 1000. I think we need an afk automatic kicker like we have on classic. It would be really helpful and reduce lag.

Chipaton

Ivy beat you to posting this! Also, I agree with this.

TarynMai


optical

What we really need is something which prevents this from happening, as it makes the entire server lag.

TarynMai

Quote from: optical on July 31, 2012, 10:24:52 PM
What we really need is something which prevents this from happening, as it makes the entire server lag.
Maybe make it so that only a certain amount of mobs can spawn/be in one chunk?

arsenic_shark

Taken from the minecraft wiki

[spoiler]every spawn cycle (every randInt(200,799) ticks when a player is within
    17 blocks of the spawner),
loop 4 times {
   if there are 6 or more of the mob type in the 17x9x17 area around the spawner,
           skip this spawn cycle
   calculate spawnerX = X coordinate of center of spawner - 0.5
   calculate spawnerY = Y coordinate of center of spawner - 0.5
   calculate spawnerZ = Z coordinate of center of spawner - 0.5
   calculate x coordinate of mob = spawnerX + (randDouble() - randDouble()) * 4,
            randDouble being a random number between 0 and 1
   calculate y coordinate of mob = spawnerY + a random integer between -1 and 1
   calculate z coordinate of mob = spawnerZ + (randDouble() - randDouble()) * 4,
            randDouble being a random number between 0 and 1
   if all of the conditions specific to the mob type are met, spawn the mob {
     chicken, cow, mooshroom, pig, sheep, wolf:
      block below spawning block is grass
      spawning block has a light level of 9 or higher

     ocelot:
      pass a 2/3 random test
      block below spawning block is grass or leaves
      on layer 63 or higher

     creeper, enderman, skeleton, spider, cave spider, zombie:
      light level 8 or less

     blaze:
      light level 11 or less

     silverfish:
      light level 11 or less, or on Stone blocks
      no players within 5 blocks

     slime:
      difficulty is not set to peaceful or slime size is small
      spawn block y coordinate is less than 40
      the chunk containing the spawn block is a slime chunk (1 in 10 chance)
      pass a 1 in 10 random test
    
     ghast:
      pass a 1 in 20 random test
    
     squid:
      must not collide with any other entities
      must be in layer 46-62

     all except squid and slimes:
      must not collide with any blocks or other entities
      must not collide with water or lava
   }
}
if all 4 mobs failed to spawn, repeat on the next tick[/spoiler]

If it was made possible that Mobs can only spawn on less amount of ticks it may reduce the spawn rate, but Im not sure if that is possible. Even then if a player was afk then they still would spawn lots of Mobs.

If there was a cap on the total number of each type of Mob that could work but then if someone is afking at a blaze spawner and there are 200 there another play would complain about theirs not working.

You could also make it so each mob de-spawns after being alive for 5 minutes. This means someone afking at the spawner for 1 hour would only get 5 minutes of spawned Mobs. Apart from this suggestion I think the only other workable solution would be Alicia's.

D00MKNlGHT

#6
Simplest solution, make the mobs below despawns faster, so the person will not afk long and hence lesser mobs also lesser lag =D

This is as the problem is the lag caused by alarge group of mobs and NOT because a guy isn't doing anything, so mob despawning should solve the problem.
Quote from: BigBadHenz on June 20, 2012, 01:05:09 PM
By the way I removed my post, your post made mine look stupid haha.

DeeKay

As well as what everyone else has said, maybe disable item pickup for afk players? Might not take effect on most mob farms, but it could possibly reduce the amount of people afking on the server for auto drops.

tiggy26668

Quote from: xDeeKay on July 31, 2012, 11:43:54 PM
As well as what everyone else has said, maybe disable item pickup for afk players? Might not take effect on most mob farms, but it could possibly reduce the amount of people afking on the server for auto drops.

the only problem with that would be then the items are sitting there lagging away until they despawn.
Quote from: flash_bomber on June 05, 2013, 08:36:49 PM
I'm Much more smarter admin than whoever banned me.

Chief149

I've had a few times when Im afk in my cactus farm, and the inventory gets full, and then a ton of cactus is at my players feet not being picked up. However even after letting it sit like that for hours (meaning 3 inventories full of cacti would be at my feet in theory) I only ended up picking up 2 to 3 stacks of cacti after selling my inventory in market (I used my second account to prevent the chunks from unloading as well). It appears that once more than 2 or 3 stacks of an item are dropped then they despawn.



Best griefer name ^



tiggy26668

Quote from: Chief149 on July 31, 2012, 11:48:46 PM
I've had a few times when Im afk in my cactus farm, and the inventory gets full, and then a ton of cactus is at my players feet not being picked up. However even after letting it sit like that for hours (meaning 3 inventories full of cacti would be at my feet in theory) I only ended up picking up 2 to 3 stacks of cacti after selling my inventory in market (I used my second account to prevent the chunks from unloading as well). It appears that once more than 2 or 3 stacks of an item are dropped then they despawn.

that sounds more like the natural despawning + the grouping the server does, course dunno if the despawn count starts at the first or last item grouped, regardless id assume the stacks would despawn based on x amount of time from one of those
Quote from: flash_bomber on June 05, 2013, 08:36:49 PM
I'm Much more smarter admin than whoever banned me.

cschurz

QuoteYou could also make it so each mob de-spawns after being alive for 5 minutes. This means someone afking at the spawner for 1 hour would only get 5 minutes of spawned Mobs.

that's honestly a pretty good idea.

optical

Indeed, some good idea's here that we were unable to think of. Another solution I thought of may be to limit the number of mobs spawned per spawner at a time to 10 or so. Will take a look at implementing either solution tonight or tomorrow - depending on how busy I am.

D00MKNlGHT

Quote from: cschurz on August 01, 2012, 12:32:21 AM
QuoteYou could also make it so each mob de-spawns after being alive for 5 minutes. This means someone afking at the spawner for 1 hour would only get 5 minutes of spawned Mobs.

that's honestly a pretty good idea.
In my opinion the mobs should despawn after half an hour regardless of ur distance from it(spawner mobs)
Quote from: BigBadHenz on June 20, 2012, 01:05:09 PM
By the way I removed my post, your post made mine look stupid haha.

xxsssx

Some people have 3 or four spawners at same place. So 30 minutes will spawn a lot of mobs.

Mobs should despawn after 10 minutes or max 15 minutes.
XXSSSX