Lithium (Fabric/NeoForge)

Lithium (Fabric/NeoForge)

36M Downloads

Stacking raid farms do not work properly

skerit opened this issue ยท 1 comments

commented

Version Information

lithium-fabric-mc1.18.2-0.7.9.jar

Expected Behavior

This raid farm depends on villagers getting their a new profession/workstation very quickly.
The workstation of the villager will be pushed & pulled by a piston, causing the villager to lose and/or regain it's profession quickly.

It's of this design:
https://www.youtube.com/watch?v=n3mOlrMGjUg

Actual Behavior

But this does not work with the performance optimizations turned on.
Getting a new profession often takes a lot of time.

Reproduction Steps

  1. Put a villager in a tight space with its workstation nearby
  2. Use a piston to enable/disable the profession
  3. See that it takes quite a while to do so

Other Information

It's a bit to be expected, of course. Making them look for workstations less frequently is the optimization.

I was looking for a way to manually trigger villagers to lose a profession & to gain a new profession. (Via a small mod)
But I can't really make heads or tails of the original code + I think all the Lithium mixins are probably making this job a bit harder.

commented

Known bug in villager AI not finding work stations and not doing other tasks, already fixed on dev branch:
You can try trading with the villager once, so it doesn't lose its profession anymore, working around the issue.
Adding the line
mixin.ai.task.memory_change_counting=false
at the end of the lithium config file config/lithium.properties also works around it.
There was a bug where lithium's memory change counter wasn't copied to the new villager brain copy that is created when the villager loses its job. Then the tasks would assume the memory hasn't changed and they still could not run, even though the memory did change.