Golem spawning issue breaks farm (issue report and advice needed) #4536

Open
opened 2024-07-23 12:58:54 +02:00 by Laudrin · 6 comments

VoxeLibre version: 0.87.2

What happened?

I built an iron farm (screenshot 1 in the picture) which will work for a few minutes until a golem spawns inside a block and gets stuck, rendering the farm useless until I destroy the golem manually.

As I tried different designs and built my farm taking designs from other MC and VL iron farms, the farm should work. I took some liberties here and there, but I am not sure which one breaks the farm.

I took inspiration from this VL iron farm design, but as I heard in multiple MC videos that golems will spawn at the utmost possible block inside the range, I put the villagers and zombie beneath the spawning platform instead of above. Just copying 1:1 could fix this maybe, but it won't explain anything and there is still the question why many MC iron farm designs won't work in VL.

What should happen:

There are some issues I found, so I will give a list here. Some may only be differences from MC (which would be okay but should be documented for players) or easily fixable, so this is a request for advice, too.

Very problematic issues

Those issues are very problematic for the farm, as they will break it after a few minutes:

  • If spawning over the zombies position, the golem will lock onto the zombie beneath (see screenshot 4) and start spinning (as reported in #4152) without getting swept away by the water. The code should prevent it from getting into an infinite loop (golem should try something else to reach the golem, at least after a while of spinning either change target, which could prevent #4152 and #4463, too, or just move randomly a few blocks to one side) or water should be strong enough to sweep the golem away.
  • Golems spawn besides slabs/blocks over the platform, but run into them and get stuck (screenshot 3). This is the main issue, as to prevent above situation to happen, I places slabs above the flowing water of the spawning platform (screenshot 4). Golems sometime spawn inside a slab on the edge of the no-spawn-area above the zombie (to prevent golem spinning), sometimes besides the slab, but then run into it. In both cases, the golems gets stuck inside the slab and cannot get out, again breaking the farm. This happens less often as the golem spinning, but every few minutes. Waiting for a long times does nothing, the golem stays stuck. If maybe the hitbox already overlaps with the slab? But even then it should "repel" the golem, as it will always walk into the slab. I tried it first with only one (lower half) slab, then one more below that, then one more (1.5 blocks now). Unfortunately this does not help and going lower will prevent water flow.

Less problematic issues

  • Spawning in small spaces. It does not happen very often, but sometimes the golem will spawn besides the zombie, being able to kill it and break the farm. According to the MC wiki, golems should only spawn when there is enough space. ("The 2×4×2 volume […] does not contain any solid or full blocks."), but they seems to be able to to it anyway. I had to add a slab over the zombie for this design and for the farm described in this issue, I had to fill the space around the zombie with slabs, dirt and fences. Imho the check for available spawning space should be more strict.
  • Golems spawn on lower slabs and glass. According to the Minecraft wiki golems should not spawn on half slabs on the lower half of an block, according to multiple YT videos also not on glass and paths made from dirt with shovel (see many iron farm designs). According to this post, slabs should be spawnproof in VL. This works for the area I made a roof out of slabs to prevent golem spinning, but not at the border of the platform. Maybe because it is the border of a spawn area (golems finds location on the edge of a spawn area, but as its hitbox is more than one block wide it will be "lifed" on top of the overwise spawnproof area?). And should golems spawn on glass?
  • Spawing under water(?) I'm not absolutely sure about that, but once I observed a golem suddenly appearing on the ocean ground below the farm (screenshot 2). First I thought all the golems accumulating on the ocean floor just spawned on the edge of the platform (see above) and moving away from the platform, thus falling into the ocean below. But it just seemed to pop into existence and it was a few blocks away from the edge, not exactly beneath as you would expect when falling down. This was clearly outside the spawning area (17×13×17 or 16×6×16 according to the wiki). As I could only observe this once, I'm not absolutely sure about the reason.

Here some height data for the iron farm:

  • Villager / Zombie x = 19
  • Platform x = 22
  • Water surface x = 0 (ocean level, no mountain lake)

Steps to reproduce

Build an iron farm with the zombie below the spawning platform with floating water. Occasionally the golem will lock onto the zombie underground, breaking the farm. Then add slabs over the water to prevent

Request for advice

Of course I could copy the farm from the YT VL video 1:1, but I would like to learn something about the game's mechanics for building my own designs, not only for iron farms. And understand why sometimes things (seem to) to wrong. So if the community could give me some advice how to prevent those things mentioned above and to improve my farm design in general, please feel free to comment with your suggestions!

VoxeLibre version: 0.87.2 ### What happened? I built an iron farm (screenshot 1 in the picture) which will work for a few minutes until a golem spawns inside a block and gets stuck, rendering the farm useless until I destroy the golem manually. As I tried different designs and built my farm taking designs from other MC and VL iron farms, the farm should work. I took some liberties here and there, but I am not sure which one breaks the farm. I took inspiration from [this VL iron farm design](https://youtu.be/uUeR5bQvSS4), but as I heard in multiple MC videos that golems will spawn at the utmost possible block inside the range, I put the villagers and zombie beneath the spawning platform instead of above. Just copying 1:1 could fix this maybe, but it won't explain anything and there is still the question why many MC iron farm designs won't work in VL. ### What should happen: There are some issues I found, so I will give a list here. Some may only be differences from MC (which would be okay but should be documented for players) or easily fixable, so this is a request for advice, too. ### Very problematic issues Those issues are very problematic for the farm, as they will break it after a few minutes: - If spawning over the zombies position, **the golem will lock onto the zombie beneath (see screenshot 4) and start spinning** (as reported in #4152) without getting swept away by the water. The code should prevent it from getting into an infinite loop (golem should try something else to reach the golem, at least after a while of spinning either change target, which could prevent #4152 and #4463, too, or just move randomly a few blocks to one side) or water should be strong enough to sweep the golem away. - Golems spawn besides slabs/blocks over the platform, but **run into them and get stuck** (screenshot 3). This is the main issue, as to prevent above situation to happen, I places slabs above the flowing water of the spawning platform (screenshot 4). Golems sometime spawn inside a slab on the edge of the no-spawn-area above the zombie (to prevent golem spinning), sometimes besides the slab, but then run into it. In both cases, the golems gets stuck inside the slab and cannot get out, again breaking the farm. This happens less often as the golem spinning, but every few minutes. Waiting for a long times does nothing, the golem stays stuck. If maybe the hitbox already overlaps with the slab? But even then it should "repel" the golem, as it will always walk into the slab. I tried it first with only one (lower half) slab, then one more below that, then one more (1.5 blocks now). Unfortunately this does not help and going lower will prevent water flow. ### Less problematic issues - **Spawning in small spaces**. It does not happen very often, but sometimes the golem will spawn besides the zombie, being able to kill it and break the farm. According to the [MC wiki](https://minecraft.fandom.com/wiki/Tutorials/Iron_golem_farming#Spawnable_Space), golems should only spawn when there is enough space. ("The 2×4×2 volume […] does not contain any solid or full blocks."), but they seems to be able to to it anyway. I had to add a slab over the zombie for [this design](https://youtu.be/JrQuD6xWHlA) and for the farm described in this issue, I had to fill the space around the zombie with slabs, dirt and fences. Imho the check for available spawning space should be more strict. - **Golems spawn on lower slabs and glass**. [According to the Minecraft wiki](https://minecraft.fandom.com/wiki/Tutorials/Iron_golem_farming#:~:text=An%20iron%20golem%20needs%20an,spawn%20rate%20of%20iron%20golems.) golems should not spawn on half slabs on the lower half of an block, according to multiple YT videos also not on glass and paths made from dirt with shovel (see many iron farm designs). According to [this post](https://git.minetest.land/VoxeLibre/VoxeLibre/issues/3419#issuecomment-62625), slabs should be spawnproof in VL. This works for the area I made a roof out of slabs to prevent golem spinning, but not at the border of the platform. Maybe because it is the border of a spawn area (golems finds location on the edge of a spawn area, but as its hitbox is more than one block wide it will be "lifed" on top of the overwise spawnproof area?). And should golems spawn on glass? - **Spawing under water(?)** I'm not absolutely sure about that, but once I observed a golem suddenly appearing on the ocean ground below the farm (screenshot 2). First I thought all the golems accumulating on the ocean floor just spawned on the edge of the platform (see above) and moving away from the platform, thus falling into the ocean below. But it just seemed to pop into existence and it was a few blocks away from the edge, not exactly beneath as you would expect when falling down. This was clearly outside the spawning area (17×13×17 or 16×6×16 according to the wiki). As I could only observe this once, I'm not absolutely sure about the reason. Here some height data for the iron farm: - Villager / Zombie x = 19 - Platform x = 22 - Water surface x = 0 (ocean level, no mountain lake) ### Steps to reproduce Build an iron farm with the zombie below the spawning platform with floating water. Occasionally the golem will lock onto the zombie underground, breaking the farm. Then add slabs over the water to prevent ### Request for advice Of course I could copy the farm from the YT VL video 1:1, but I would like to learn something about the game's mechanics for building my own designs, not only for iron farms. And understand why sometimes things (seem to) to wrong. So if the community could give me some advice how to prevent those things mentioned above and to improve my farm design in general, please feel free to comment with your suggestions!
Laudrin added the
bug
unconfirmed
labels 2024-07-23 12:58:54 +02:00
Member

A few things:

I'm guessing the golem locking onto and trying to attack the zombie is related to #4152 that you reported about 6 months ago. Probably is missing a line of sight check before trying to attack.

There is a known issue with mob spawning volume checks (#2624) and a PR that resolves it (#4445)

There is a sparate know issue with mobs spawning underwater (#2692) and a different PR with fixes for it (#4468)

A few things: I'm guessing the golem locking onto and trying to attack the zombie is related to https://git.minetest.land/VoxeLibre/VoxeLibre/issues/4152 that you reported about 6 months ago. Probably is missing a line of sight check before trying to attack. There is a known issue with mob spawning volume checks (https://git.minetest.land/VoxeLibre/VoxeLibre/issues/2624) and a PR that resolves it (https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4445) There is a sparate know issue with mobs spawning underwater (https://git.minetest.land/VoxeLibre/VoxeLibre/issues/2692) and a different PR with fixes for it (https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4468)
Author

Thank you for the explanation and references, @teknomunk! 🙂

So if there are no issues with the PRs, at least those two issues will be fixed in the next VL release?

Does PR #4445 also fix the golem getting stuck in blocks like mentioned above?

Is there any plan to / idea how to fix the line of sight issue? There are some situations where it makes sense (no pun intended) that mobs will sense the player or other mobs, like when the player gets near a mob spawner or that villagers will panic if they sense a zombie even before they see it. So maybe sensing the zombie is less than a problem than the golem getting stuck by trying to reach a unreachable destination?

And one more request for advice: How to prevent spawning of golems on the edge wall of a spawning platform? 😓 Do I have to increase the height of the wall (causing other inconveniences), use a fence, …?

Sorry for the many questions! 😅

Thank you for the explanation and references, @teknomunk! 🙂 So if there are no issues with the PRs, at least those two issues will be fixed in the next VL release? Does PR #4445 also fix the golem getting stuck in blocks like mentioned above? Is there any plan to / idea how to fix the line of sight issue? There are some situations where it makes sense (no pun intended) that mobs will sense the player or other mobs, like when the player gets near a mob spawner or that villagers will panic if they sense a zombie even before they see it. So maybe sensing the zombie is less than a problem than the golem getting stuck by trying to reach a unreachable destination? And one more request for advice: How to prevent spawning of golems on the edge wall of a spawning platform? 😓 Do I have to increase the height of the wall (causing other inconveniences), use a fence, …? Sorry for the many questions! 😅
Member

So if there are no issues with the PRs, at least those two issues will be fixed in the next VL release?

That's my understanding.

Does PR #4445 also fix the golem getting stuck in blocks like mentioned above?

It does not.

Is there any plan to / idea how to fix the line of sight issue? There are some situations where it makes sense (no pun intended) that mobs will sense the player or other mobs, like when the player gets near a mob spawner or that villagers will panic if they sense a zombie even before they see it. So maybe sensing the zombie is less than a problem than the golem getting stuck by trying to reach a unreachable destination?

I don't believe there is a PR in the works that would resolve the line of soght issue.

And one more request for advice: How to prevent spawning of golems on the edge wall of a spawning platform? 😓 Do I have to increase the height of the wall (causing other inconveniences), use a fence, …?

I suspect that with how the game is currently coded you may need to build the wall up to above the height of the golem spawning volume.

> So if there are no issues with the PRs, at least those two issues will be fixed in the next VL release? That's my understanding. > Does PR #4445 also fix the golem getting stuck in blocks like mentioned above? It does not. > Is there any plan to / idea how to fix the line of sight issue? There are some situations where it makes sense (no pun intended) that mobs will sense the player or other mobs, like when the player gets near a mob spawner or that villagers will panic if they sense a zombie even before they see it. So maybe sensing the zombie is less than a problem than the golem getting stuck by trying to reach a unreachable destination? I don't believe there is a PR in the works that would resolve the line of soght issue. > And one more request for advice: How to prevent spawning of golems on the edge wall of a spawning platform? 😓 Do I have to increase the height of the wall (causing other inconveniences), use a fence, …? I suspect that with how the game is currently coded you may need to build the wall up to above the height of the golem spawning volume.
Author

I suspect that with how the game is currently coded you may need to build the wall up to above the height of the golem spawning volume.

Thank you for the hint! At least for now, it seems golems don't spawn at the edge anymore.

I tried the same for the edges of the no-spawning-area to prevent golem spinning above the zombies, but they will still get stuck, but less than before. So at least a small improvement.

> I suspect that with how the game is currently coded you may need to build the wall up to above the height of the golem spawning volume. Thank you for the hint! At least for now, it seems golems don't spawn at the edge anymore. I tried the same for the edges of the no-spawning-area to prevent golem spinning above the zombies, but they will still get stuck, but less than before. So at least a small improvement.

No offense but I think your design are very complicated, I made simple working iron farm in MCLA and yes they also stuck when spawn on edge but with simple fix like what I did can be the solution, I hope it will help you.

No offense but I think your design are very complicated, I made simple working iron farm in MCLA and yes they also stuck when spawn on edge but with simple fix like what I did can be the solution, I hope it will help you.
Author

No offense but I think your design are very complicated, I made simple working iron farm in MCLA and yes they also stuck when spawn on edge but with simple fix like what I did can be the solution, I hope it will help you.

No offense taken, @bramaudi, thank you for your farm screenshot! 🙂

As I mentioned above I used a relatively simple design taken from this YouTube video which worked fine in MCLA but did not in VL. There was some problem with sign placing to contain the lava or so. Therefore I changed the design to use magma blocks, which made the farm incredibly slow.

So I tried a new design where the golems will fall down a tube, so the villagers could not detect the golem anymore and spawn a new one, so slow damage would not be a problem anymore. I now use the issues of the farm to get to know more about the physics of the game, because just copying a farm like I did the first time without knowing the mechanics how everything works will not enable me to create my own designs for iron or other farms.

As there may be issues with the game or the engine involved (like golem spinning or unsuccessful pathfinding), I decided to report my problems and asking for help.

But as I see you used signs for containing the lava in your farm, I will try again to implement the farm design which worked in MCLA in VL, so thanks again! :-)

> No offense but I think your design are very complicated, I made simple working iron farm in MCLA and yes they also stuck when spawn on edge but with simple fix like what I did can be the solution, I hope it will help you. No offense taken, @bramaudi, thank you for your farm screenshot! 🙂 As I mentioned above I used a relatively simple design taken from [this YouTube video](https://youtu.be/JrQuD6xWHlA) which worked fine in MCLA but did not in VL. There was some problem with sign placing to contain the lava or so. Therefore I changed the design to use magma blocks, which made the farm incredibly slow. So I tried a new design where the golems will fall down a tube, so the villagers could not detect the golem anymore and spawn a new one, so slow damage would not be a problem anymore. I now use the issues of the farm to get to know more about the physics of the game, because just copying a farm like I did the first time without knowing the mechanics how everything works will not enable me to create my own designs for iron or other farms. As there may be issues with the game or the engine involved (like golem spinning or unsuccessful pathfinding), I decided to report my problems and asking for help. But as I see you used signs for containing the lava in your farm, I will try again to implement the farm design which worked in MCLA in VL, so thanks again! :-)
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: VoxeLibre/VoxeLibre#4536
No description provided.