Shopkeepers

Shopkeepers

2M Downloads

Some shopkeeper mob types can be exploited for an iron farm

rymiel opened this issue ยท 4 comments

commented
  • Shopkeepers version: 2.12.0
  • Spigot version: 3024-Spigot-79d53c2-90d6905 but mostly irrelevant

The issue:

Having regular villagers confined in an area and placing a shopkeeper as a type of mob that villagers fear, for example, a pillager, would cause the villagers to panic and eventually spawn an iron golem. This can be used to create an iron golem farm, substituting the zombie inside with a shopkeeper. Note that the golems don't attack the shopkeeper (which is correct behaviour)

I do not know how invasive the plugin would have to be to vanilla AI to prevent this, but the only fix currently is to disable any kinds of mobs that villagers may fear in the config. I also don't know if any other similar farms can be built like this but it's likely, since the shopkeepers themselves are NoAI but any other mob that detects them doesn't account for that.

commented

Fixed in v2.13.0

commented

Thank you, summoning with Invulnerable and NoAI tags does in fact make the villagers peaceful!

commented

I made a change that should fix this in the next version (9163a29).
However, I haven't tested this myself yet. If you want to try it out and let me know if it resolves your issue, you can find a snapshot of this here: https://nexus.lichtspiele.org/repository/snapshots/com/nisovin/shopkeepers/Shopkeepers/2.13.0-SNAPSHOT/Shopkeepers-2.13.0-20210501.171744-2.jar

However, this is a snapshot version that also includes various other changes, and it may not be revertable (it contains several data migrations), nor forwards compatible (if I end up changing more stuff before releasing it). See my notes on that here: #728 (comment)

commented

The Bukkit API does not seem to provide a direct mechanism to hook into this aspect. However, could you test if mobs marked as Invulnerable are causing the same issue (eg. by summoning some non-AI pillagers with Invulnerable:1b via Minecraft's summon command)? If these mobs are ignored by the villagers panicking behavior (which I currently assume), then marking all shopkeeper mobs as invulnerable might be an option to resolve this.