Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-6232

Doubly efficient iron golem farm due to jet lags in worlds

XMLWordPrintable

    • git-Spigot-a19903d-bc6a175 (MC: 1.16.4) (Implementing API version 1.16.4-R0.1-SNAPSHOT)
    • Yes

      Iron golem farms normally don't work during nights because villagers sleep. However, in some special situations, an iron golem farm may work at night, making it doubly efficient.

      Overview 

      In Spigot, different worlds (or dimensions) can have different world ages, which is reminiscent of the "time" in the real world.

      For this farm to work, we assume the server has two worlds:

      • World A has age 150000000.
      • World B has age 1000.

      We will soon discuss how such worlds may exist in some servers.

      The core of this farm is as follows:

      • We let a villager sleep/work in World A (age 150000000).
      • Then we send the villager to World B (age 1000) where we have the iron golem farm.

      The villagers will remember that, at time ~150000000, they have slept and worked. 

      So, in World B, villagers will satisfy the iron golem generation conditions since they have slept/worked "recently", though here "recently" is in fact "in the future". We call this jet lag since the villagers are unaware that they are in a different time. We don't provide beds or work stations to villagers in World B, so "last_slept" and "last_worked_at_poi" remain unchanged.

      It seems unlikely that we can find World A/B unless the server has a multiverse plugin. But, interestingly, due to the nether update, many servers have world A/B.

      To upgrade to 1.16 and enjoy the new nether, many servers delete their old nether world, by removing/renaming the `world_nether` directory in Spigot. This causes the Spigot to create a new nether world, which has a very young age. Therefore, in our story, we consider World A to be the "overworld", and World B to be the new "nether" that is created, possibly, months or years after World A. 

      This, therefore, leads to an iron golem farm that works at night, as we don't provide beds for the villagers. We now describe this farm in more detail.

       

      Step 1: Training

      We need three villagers that satisfy the following conditions:

      • have never seen iron golems, such as newly born villagers, in a breeding space with <4 villagers (this condition may not be needed—needs double check).
      • work recently.
      • sleep recently.

      This can be constructed by having three villagers who are newly born in an isolated space, providing them with beds and work stations (such as composters).

      The training process needs to last for at least one day and night. The night is for sleeping. The day is for work (note: villagers do not work immediately after sunrise, so be patient). One who has permission can use the "/data" command to see the memories of the villagers.

      Once the training is done, we can send the villager to World B, which we assume that we have already built an iron golem farm that:

      • does not have any bed or work station.
      • has a zombie or other mob that can scare the villagers but would not hurt them.
      • has a working way of killing the iron golems, as well as having sufficient protection that iron golems cannot hurt the zombie.

       

      Step 2: Moving

      In our setting, World B is the nether. It takes efforts to send the villagers to World B.

      Often, we use the railway to send the villagers to somewhere close to the nether portal, use the activator rail to eject the villager, and push the villager to the portal.

      Then, the player enters the nether and works hard to move the villager to the desired locations.

      Needless to say, in case you have permission, you can execute "tp" in the nether, to send the villagers to the desired locations.

       

      Step 3: Farming

      It can be tricky to build iron golem farms in the nether, for two reasons: (1) no water and (2) hard to find an empty space so that iron golems do not spawn outside.

      There are many potential solutions, so here we just provide one for reference:

      (1) we can use wither roses to kill iron golems.

      (2) we can put buttons on the ground to prevent iron golems from spawning on that block, thereby restricting the potential locations.

      The following snapshot shows how the iron golems die. 

       

      Another solution is to use a zombie to attract the iron golem to a trap, where the trapdoor will make the iron golem fall into the lava killing system.

      The corresponding map files are also attached to this issue. The overworld is much older than the nether. (This is created by using the NBT explorer.) Note that this farm has not been carefully constructed. Iron golems may leak.

       

      Discussion:

      Note that villagers may need to be retrained once World B's age reaches the original age of World A during training. To retrain, send the villagers back to the overworld for a night and a day. 

      This farm only has a minor impact on any servers. For a player, it is easier to build two iron golem farms in the overworld than building such a farm in the nether, as well as the player needs to stay in the nether to make the farm work.

       

      Potential fixes:

      The problem stems from two parts:

      (1) Spigot uses separate "level.dat" for the overworld, the nether, and the end, which permits the nether to have a different world age than the overworld if it is recreated. Note: for this reason, this is a bug at the Spigot level, not at the Minecraft level.

      (2) More inherently, villagers treat sleeping and working "in the future" as "recent", which could be seen as a feature, or as a bug. 

      It seems that the most elegant fix is to let the villager resync the time when being teleported, or a simple fix is to let the villager disregard sleeping/working "in the future". This can also be left as a feature.

        1. doubly_efficient_iron_golem_farm.png
          322 kB
          Weikeng Chen
        2. iron_golem_farm.png
          1.09 MB
          Weikeng Chen

            Unassigned Unassigned
            weikengchen Weikeng Chen
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: