Vampirism - Become a vampire!

Vampirism - Become a vampire!

16M Downloads

[Bug]: server crashes at startup

WEEDMEN opened this issue ยท 2 comments

commented

Minecraft Version

1.16.5

Forge Version

36.2.39

Vampirism Version

1.9.1

Modpack

No response

Singleplayer/Multiplayer

Multiplayer

What happened?

server crashes at startup
incompatibility with cooking for blockheads, a link for you to understand the error TwelveIterationMods/CookingForBlockheads#547 (comment)

Relevant log output

Caused by: java.lang.NoClassDefFoundError: net/blay09/mods/cookingforblockheads/IMCHandler
	at net.minecraftforge.eventbus.ASMEventHandler_267_IMCHandler_onFoodRegistryInit_FoodRegistryInitEvent.invoke(.dynamic) ~[?:?]
	at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-4.0.0.jar:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:304) ~[mohist.jar:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:284) ~[mohist.jar:?]
	at net.blay09.mods.cookingforblockheads.registry.CookingRegistry.initFoodRegistry(CookingRegistry.java:56) ~[cookingforblockheads:9.3.4]
	at net.blay09.mods.cookingforblockheads.CookingForBlockheads.lambda$addReloadListenersLate$2(CookingForBlockheads.java:133) ~[cookingforblockheads:9.3.4]
	at net.minecraft.resources.IResourceManagerReloadListener.func_232635_a_(IResourceManagerReloadListener.java:18) ~[?:?]

Reproduce steps

  1. Load server world

Other relevant mods

CookingForBlockheads 9.3.4

commented

Has this anything to do with Vampirism?

commented

https://github.com/TeamLapen/Vampirism/blob/1.19/src/main/java/de/teamlapen/vampirism/config/BloodValues.java#L30

Using thenAcceptAsync breaks class loading of reload listeners running after yours, as it uses a default executor that was created with a different parent class loader than the one Forge uses for mods.

You need to either use thenAccept or supply your own Executor as second argument to thenAcceptAsync.