autaut03 / kottle

Kotlin language provider for Forge 1.13.2+
GNU Lesser General Public License v3.0
30 stars 13 forks source link

Can't add event bus listeners via method references #12

Closed TheLimePixel closed 5 years ago

TheLimePixel commented 5 years ago

So, I've noticed that

FMLKotlinModLoadingContext.get().modEventBus.addListener<InterModProcessEvent> { processIMC(it) }

works as you'd expect it to, but

FMLKotlinModLoadingContext.get().modEventBus.addListene(this::processIMC)

causes a crash.

I was wondering if this is a bug or just a limitation.

autaut03 commented 5 years ago

Hey, thanks for reporting. Yes, this is a bug indeed and I'm aware of it, but I haven't had much time to look into it.

Closing this as a duplicate of https://github.com/autaut03/kottle/issues/8.