Bountiful

Bountiful

35M Downloads

[Bug]: Ticking Entity Crash When Villagers Near Bounty Board

alexiswatson opened this issue ยท 2 comments

commented

What happened?

When staying in a village where villagers are kept near bounty boards, after a time, the game throws and crashes to launcher unexpectedly.

Relevant log snippet:

java.util.NoSuchElementException: No value present
	at java.base/java.util.Optional.get(Optional.java:143)
	at io.ejekta.bountiful.content.villager.WalkToBoardTask.keepRunning(WalkToBoardTask.java:44)
	at io.ejekta.bountiful.content.villager.WalkToBoardTask.method_18924(WalkToBoardTask.java:13)
	...

Full log follows.

How can we reproduce it?

Create a village in an SP world, with villagers kept in 2x2 cells with beds. Replace two blocks of each cell with a profession block and bounty board, such that the villager can reach both. Where feasible, add decrees to each board aligning with that villager's profession. Wait.

This crash occurs once every few hours, and cannot seem to be reproduced on command, though does not appear to require direct interaction with either the villagers, bounty boards, bounties, or decrees to occur. Notably, the ticking entity (always a villager) differs each time, and does not appear to be isolated to any specific profession.

The crash does not seem to occur when the village chunk is unloaded.

Mod Version

7.0.2

Mod Loader

Fabric

Mod Loader Version

fabric-api-0.97.0+1.20.4

Relevant log output

crash-2024-04-19_18.33.16-server.txt

commented

Ah, this is a fun one.

Seems like the memory module access is failing, due to a villager forgetting where the nearest Board is. I'll have to just make it optional.

commented

This is fixed in 76b307f and will be in a future release for either 1.20.4 or a newer version. Thanks!