Discussion forum > Suggestions

AFK Kicking

<< < (2/6) > >>

arsenic_shark:
Taken from the minecraft wiki

(click to show/hide)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
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:
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.

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.

--- End quote ---

the only problem with that would be then the items are sitting there lagging away until they despawn.

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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version