Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Villagers get out of bed at the wrong location

Open adepierre opened this issue 6 years ago • 14 comments

What behaviour is expected:

The villager should get out of his bed on the one block we want when he is in a cell

What behaviour is observed:

The villager escapes to blocks he doesn't in vanilla

Steps/models to reproduce:

I found this testing the simple model of iron farm presented by Gnembon in this video. World download

  • load the world with paper
  • go to the farm with rails
  • /time set night to force the villagers to go to bed
  • /time set day to let them get out of it

Some of them should be out of their cell

Plugin list:

None

Paper build number:

Paper-126

Anything else:

Here is an image of the cell they escape from. One villager has decided to leave its bed on the glass block two layers under the bed. The same behaviour doesn't happen on a vanilla server where all the villagers get out on the one block in the middle.

image

adepierre avatar Mar 06 '20 18:03 adepierre

I'm have the same issue with the same farm...

Awakened-Redstone avatar Mar 09 '20 16:03 Awakened-Redstone

@Awakened-Redstone there is a simple fix for the farm: just fill the space under the two beds with glass and add 3 more on the next block.

You should end up with something like that (V = villagers, B= bed and G = glass):

V   B    B   G
    G    G   G
    G    G   G

This doesn't fix the paper bug but it fixes the farm in paper :)

adepierre avatar Mar 09 '20 16:03 adepierre

Tanks, was searching for a temporary fix

Awakened-Redstone avatar Mar 09 '20 16:03 Awakened-Redstone

Odd, it's like they /try/ to wake up where they're supposed to, and just derp somewhere in the process, had one that just floated around randomly when tryna sleep in general before popping underneath the beds...

electronicboy avatar Mar 10 '20 13:03 electronicboy

I have the sam issue to with same farm. have a video with some bad english and a world download. https://youtu.be/D-IJM0JW8bY https://drive.google.com/drive/folders/1VQ_7x6hg9E449HhlidPkpwh9GJaHYVtO?usp=sharing

Noah0505 avatar Mar 14 '20 19:03 Noah0505

If it helps, replacing the inner side of the glass box with slabs solves the problem (if you really need your iron farm to work)! like this: https://i.imgur.com/hGxu5vz.png

Articdive avatar Mar 20 '20 07:03 Articdive

I have the sam issue to with same farm. have a video with some bad english and a world download. https://youtu.be/D-IJM0JW8bY https://drive.google.com/drive/folders/1VQ_7x6hg9E449HhlidPkpwh9GJaHYVtO?usp=sharing

Hey, I downloaded your world but I cant find where the iron farm actually is. Do you have coordinates?

luke790 avatar Mar 27 '20 09:03 luke790

I have the sam issue to with same farm. have a video with some bad english and a world download. https://youtu.be/D-IJM0JW8bY https://drive.google.com/drive/folders/1VQ_7x6hg9E449HhlidPkpwh9GJaHYVtO?usp=sharing

Hey, I downloaded your world but I cant find where the iron farm actually is. Do you have coordinates?

The coordinates is -1085 78 2262

Noah0505 avatar Mar 27 '20 09:03 Noah0505

Had this issue as well, ended up replacing some of the glass with slabs. It appears to have been caused by patch 0242 that allows a configurable bed search radius.

ghost avatar Mar 29 '20 21:03 ghost

It looks like patch 0242 replaces vanilla bed search with a configurable bed search algorithm, and defaults the bed search radius to vanilla settings.

There's a few ways to fix it and it should be a pretty simple PR either way. Not sure what the more paper-mc community way to fix it would be though. Of these alternatives what would be the better options

  1. Use vanilla code for both players and villagers when bed search radius is set to 1
  2. Always use vanilla code for villagers, since it seems unlikely that the intent was for this patch to impact villagers.
  3. Both (I'd lean towards doing both personally)

From the comments it doesn't seem like it is intended to be a performance optimization. Seems like when we're adding configuration to change vanilla behavior it would be wise to always use the vanilla code when that config can be toggled "off" or set to a vanilla-like default. That way it's an opt-in for differences in quirks between the two.

bregger avatar Apr 13 '20 17:04 bregger

the point of those changes was to help players, so less needed really for villagers. was simply a side effect of mojang reusing that code for villagers. id be ok with them going to vanilla logic.

aikar avatar Apr 13 '20 19:04 aikar

kickash has made some changes that should resolve this, please let us know if still an issue in latest build

aikar avatar Apr 21 '20 03:04 aikar

Appears to still be an issue in the latest build. My villagers just keep escaping...

ghost avatar Apr 23 '20 05:04 ghost

I have tested the farm configuration many times and it never happened after the fix, can you reupload your world download. The current link doesn't work.

kickash32 avatar Apr 23 '20 06:04 kickash32