The Meaning of Life, the Universe, and Everything.
Title says most of it but let me explain.
I play a 24/7 survival server with my 2 buddies and today I made a slime farm and a pumpkin farm. If I disconnect from the server, will my slime farm and my pumpkin farm continue to function?
Rollback Post to RevisionRollBack
send minecraft diamonds or else i will hit you in the face with my diamond sword
Iron farms are a special case, crops don't grow and slimes despawn if no players are close enough.
Yup, this ^
Iron farms are a very special case. You can even employ chunk loaders to keep spawn loaded when no one is logged into the server, and an iron farm will keep producing. But slimes and crops require player proximity. Nothing will happen in a slime or pumpkin farm without a player nearby. For a slime farm the player must be no closer than 24 blocks from the slime chunk, and no further than 128 blocks away. For crops the player just needs to be close enough to keep the chunks loaded (and not lazy).
Additionally, mobs like slimes will stop moving shortly after spawning if no player is within 32 blocks, so unless your slime farm has some kind of flushing and killing system, it won't produce much when you are further away. The slimes will spawn, hop around briefly looking for a target, then just stand around until they despawn.
However, there is a way to give the slimes a target other than a player. Slimes are hostile to iron golems, so if you place an iron golem near the slime chunk, the slimes will try and attack the golem. You can then devise a killing and collection system to take advantage of that. A simple one I like to use is to place an iron golem on a block on top of a 3 tall cactus, and surround that with hoppers feeding into a chest. The slimes will bump into the cactus while trying to attack the golem, take damage and die, dropping their slime balls, which are collected by the hoppers (use fences to keep the golem in place).
This is such a farm I have in my main SSP world using 2 diagonally adjacent slime chunks. It produced a decent amount of slime balls before I did any area prep, but after spawn blocking the surrounding area it really went crazy and cranks out loads of slime balls. A single row of hoppers will collect most of the slime balls, but a double row will get them all. You still need to be in the vicinity for this to work, but you don't need to be within 32 blocks.
I have seen other designs that use fall damage, magma blocks, and even drowning to kill the slimes.
It is worth noting that the game only disables the "wander" AI of mobs that are too far away (this is due to the computational cost of pathfinding), so, for example, zombies can continue following the player from more than 32 blocks away, Endermen can be aggroed and give chase, and more:
public class EntityAIWander extends EntityAIBase
public boolean shouldExecute()
if (this.entity.getAge() >= 100)
(the "age" of an entity is incremented by one every tick and is set to 0 when they are within 32 blocks of a player, or are marked as persistent; this also means that mobs that picked up an item or were renamed will continue to randomly wander)
I'm not sure about current versions either but the reason why slimes continue moving (in 1.6.4) is because they have their own AI instead of using the "new" AI (they were updated to it in 1.8 along with other mobs with special AI needs. The new AI also features an improved pathfinder so mobs avoid obstacles, but it is much more expensive to run, hence it is disabled unless they are close to the player. Slime jumping and movement likely uses a custom AI function).