Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-237451

A simple chicken farm can cause exponential server performance loss or a lag bomb for players

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 21w38a
    • Confirmed
    • (Unassigned)

      I've encountered this problem on a multiplayer server, where a player has built such a farm in my town. It quickly started to cause serious problems.
      I've searched for potential duplicates but could not find anything.
      This very simple mechanism can cause exponenial loss in server performance. Anyone can easily create it, and it just requires staying AFK for some time.
      Knowing that:
      a) chickens cannot despawn.
      b) chickens lay eggs.
      c) eggs can be used to spawn more chickens.
      A very simple mechanism can be built that can completely destroy server performance over time.
      This farm can also be used as a lag bomb, when the player loads the chunk with this farm they'll start to render thousands of chickens at once, potentially crashing their game.

      1. Make a box to fit all of the chickens that are going to spawn here. One block can fit 24 entities without them dying from entity cramming. A 10x10 box can easily fit 2400 chickens.
      2. Fill the floor with hoppers all pointing to the center of the room.
      3. Place a dispencer in the middle and create a simple redstone circuit that is going to activate the dispencer.
      4. Lure a chicken into the box.
      5. It should look like this:
      6. Now stay AFK and wait for a chicken to start laying eggs.
        At first, the contraption does not seem problematic. However, as soon as the second chicken appears from the thrown eggs, they both are going to start laying eggs. Then 4. Then 8. Then 16. Then 32. Chickens are going to grow in numbers exponentially, faster and faster each time, very quickly contributing to the server lag.
        Solution: as soon as the passive mobcap reaches its max, make it impossible for the eggs to spawn more chickens.

            Unassigned Unassigned
            PreverseDmitry Dmitry Konev
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: