Kotlin for Forge

Kotlin for Forge

73M Downloads

get().extension() must not be null during datagen event

KP2048 opened this issue ยท 1 comments

commented
[10:02:56] [main/ERROR] [th.ko.LoggerKt/]: Exception caught during firing event: get().extension() must not be null
	Index: 1
	Listeners:
		0: NORMAL
		1: net.minecraftforge.eventbus.EventBus$$Lambda$4094/0x0000000801645120@299a0651
java.lang.NullPointerException: get().extension() must not be null
	at LAYER PLUGIN/[email protected]/thedarkcolour.kotlinforforge.KotlinModLoadingContext$Companion.get(KotlinModLoadingContext.kt:18)
	at TRANSFORMER/[email protected]/com.withertech.enchantmentforge.dsl.Dsl.<init>(ForgeDsl.kt:139)
	at TRANSFORMER/[email protected]/com.withertech.enchantmentforge.dsl.DataGen.<init>(ForgeDsl.kt:119)
	at TRANSFORMER/[email protected]/com.withertech.enchantmentforge.dsl.ModEvent.Data(ForgeDsl.kt:97)
	at TRANSFORMER/[email protected]/com.withertech.enchantmentforge.EnchantmentForge$Mod$1$1$4.invoke(EnchantmentForge.kt:51)
	at TRANSFORMER/[email protected]/com.withertech.enchantmentforge.EnchantmentForge$Mod$1$1$4.invoke(EnchantmentForge.kt:50)
	at TRANSFORMER/[email protected]/com.withertech.enchantmentforge.dsl.ModEvent.Event$lambda$0(ForgeDsl.kt:76)
	at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:260)
	at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:252)
	at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:315)
	at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:296)
	at LAYER PLUGIN/[email protected]/thedarkcolour.kotlinforforge.KotlinModContainer.acceptEvent(KotlinModContainer.kt:100)
	at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModLoader.lambda$runEventGenerator$33(ModLoader.java:304)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModList.forEachModInOrder(ModList.java:225)
	at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModLoader.runEventGenerator(ModLoader.java:304)
	at TRANSFORMER/[email protected]/net.minecraftforge.data.loading.DatagenModLoader.begin(DatagenModLoader.java:52)
	at TRANSFORMER/[email protected]/net.minecraft.data.Main.main(Main.java:97)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.ForgeDataUserdevLaunchHandler.lambda$launchService$0(ForgeDataUserdevLaunchHandler.java:28)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:106)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
	at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141)

[10:02:56] [main/ERROR] [th.ko.LoggerKt/]: Caught exception during event net.minecraftforge.data.event.GatherDataEvent@7668b4ff dispatch for modid enchantmentforge
java.lang.NullPointerException: get().extension() must not be null
	at thedarkcolour.kotlinforforge.KotlinModLoadingContext$Companion.get(KotlinModLoadingContext.kt:18) ~[kfflang-4.1.0.jar%23197!/:4.1.0] {}
	at com.withertech.enchantmentforge.dsl.Dsl.<init>(ForgeDsl.kt:139) ~[%23186!/:?] {re:classloading}
	at com.withertech.enchantmentforge.dsl.DataGen.<init>(ForgeDsl.kt:119) ~[%23186!/:?] {re:classloading}
	at com.withertech.enchantmentforge.dsl.ModEvent.Data(ForgeDsl.kt:97) ~[%23186!/:?] {re:classloading}
	at com.withertech.enchantmentforge.EnchantmentForge$Mod$1$1$4.invoke(EnchantmentForge.kt:51) ~[%23186!/:?] {re:classloading}
	at com.withertech.enchantmentforge.EnchantmentForge$Mod$1$1$4.invoke(EnchantmentForge.kt:50) ~[%23186!/:?] {re:classloading}
	at com.withertech.enchantmentforge.dsl.ModEvent.Event$lambda$0(ForgeDsl.kt:76) ~[%23186!/:?] {re:classloading}
	at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:260) ~[eventbus-6.0.3.jar%23102!/:?] {}
	at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:252) ~[eventbus-6.0.3.jar%23102!/:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.3.jar%23102!/:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.3.jar%23102!/:?] {}
	at thedarkcolour.kotlinforforge.KotlinModContainer.acceptEvent(KotlinModContainer.kt:100) ~[kfflang-4.1.0.jar%23197!/:4.1.0] {}
	at net.minecraftforge.fml.ModLoader.lambda$runEventGenerator$33(ModLoader.java:304) ~[fmlcore-1.19.4-45.0.40.jar:?] {}
	at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {}
	at net.minecraftforge.fml.ModList.forEachModInOrder(ModList.java:225) ~[fmlcore-1.19.4-45.0.40.jar:?] {}
	at net.minecraftforge.fml.ModLoader.runEventGenerator(ModLoader.java:304) ~[fmlcore-1.19.4-45.0.40.jar:?] {}
	at net.minecraftforge.data.loading.DatagenModLoader.begin(DatagenModLoader.java:52) ~[forge-1.19.4-45.0.40_mapped_official_1.19.4-recomp.jar:?] {re:classloading}
	at net.minecraft.data.Main.main(Main.java:97) ~[forge-1.19.4-45.0.40_mapped_official_1.19.4-recomp.jar:?] {re:classloading}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}
	at net.minecraftforge.fml.loading.targets.ForgeDataUserdevLaunchHandler.lambda$launchService$0(ForgeDataUserdevLaunchHandler.java:28) ~[fmlloader-1.19.4-45.0.40.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.8.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.8.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.8.jar:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) ~[modlauncher-10.0.8.jar:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) ~[modlauncher-10.0.8.jar:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.8.jar:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.8.jar:?] {}
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?] {}
Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:32)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:106)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
	at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141)
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.ForgeDataUserdevLaunchHandler.lambda$launchService$0(ForgeDataUserdevLaunchHandler.java:28)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30)
	... 7 more
Caused by: net.minecraftforge.fml.ModLoadingException: fml.modloading.errorduringevent
	at LAYER PLUGIN/[email protected]/thedarkcolour.kotlinforforge.KotlinModContainer.acceptEvent(KotlinModContainer.kt:104)
	at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModLoader.lambda$runEventGenerator$33(ModLoader.java:304)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModList.forEachModInOrder(ModList.java:225)
	at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModLoader.runEventGenerator(ModLoader.java:304)
	at TRANSFORMER/[email protected]/net.minecraftforge.data.loading.DatagenModLoader.begin(DatagenModLoader.java:52)
	at TRANSFORMER/[email protected]/net.minecraft.data.Main.main(Main.java:97)
	... 13 more
Caused by: java.lang.NullPointerException: get().extension() must not be null
	at LAYER PLUGIN/[email protected]/thedarkcolour.kotlinforforge.KotlinModLoadingContext$Companion.get(KotlinModLoadingContext.kt:18)
	at TRANSFORMER/[email protected]/com.withertech.enchantmentforge.dsl.Dsl.<init>(ForgeDsl.kt:139)
	at TRANSFORMER/[email protected]/com.withertech.enchantmentforge.dsl.DataGen.<init>(ForgeDsl.kt:119)
	at TRANSFORMER/[email protected]/com.withertech.enchantmentforge.dsl.ModEvent.Data(ForgeDsl.kt:97)
	at TRANSFORMER/[email protected]/com.withertech.enchantmentforge.EnchantmentForge$Mod$1$1$4.invoke(EnchantmentForge.kt:51)
	at TRANSFORMER/[email protected]/com.withertech.enchantmentforge.EnchantmentForge$Mod$1$1$4.invoke(EnchantmentForge.kt:50)
	at TRANSFORMER/[email protected]/com.withertech.enchantmentforge.dsl.ModEvent.Event$lambda$0(ForgeDsl.kt:76)
	at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:260)
	at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:252)
	at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:315)
	at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:296)
	at LAYER PLUGIN/[email protected]/thedarkcolour.kotlinforforge.KotlinModContainer.acceptEvent(KotlinModContainer.kt:100)
	... 19 more
	
	```
commented

nvm my fault