-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
None
-
This server is running CraftBukkit version git-Spigot-798ea6a-44d675a (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)
-
Yes
Example plugin code: https://pastebin.com/3HGz5xhz
When clicking a block with a carrot, this spawns a NoAI villager with farmer profession. The villager will however lose its profession shortly after being spawned, due to Spigot's entity activation feature occasionally skipping ticking of supposedly active entities (every 4 ticks) and then instead calls the entity's inactiveTick function. For Villagers this will however call mobTick, which performs mob AI related tasks, even if the villager has the NoAI flag set.
The linked source code contains some additional details on the preconditions for this issue to occur.
Possible solution: Check the mob's NoAI flag before calling mobTick during the villager's inactive tick.