chubel10 Posted May 2, 2020 Share Posted May 2, 2020 (edited) My mod works fine in my workspace and I already finished it (its my first mod). When I use the "gradlew build" command and put the jar in my mods folder it gives me an error. Here is my log. Spoiler Spoiler [02May2020 17:44:45.588] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, <username>, --version, 1.15.2-forge-31.1.0, --gameDir, /Users/<username>/Library/Application Support/minecraft, --assetsDir, /Users/<username>/Library/Application Support/minecraft/assets, --assetIndex, 1.15, --uuid, 8d0e3ad0782941869f7617fb8fd2556f, --accessToken, ❄❄❄❄❄❄❄❄, --userType, legacy, --versionType, release, --launchTarget, fmlclient, --fml.forgeVersion, 31.1.0, --fml.mcVersion, 1.15.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20200122.131323] [02May2020 17:44:45.593] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 5.0.0-milestone.4+67+b1a340b starting: java version 1.8.0_74 by Oracle Corporation [02May2020 17:44:45.876] [main/INFO] [net.minecraftforge.fml.loading.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust [02May2020 17:44:47.369] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmlclient' with arguments [--version, 1.15.2-forge-31.1.0, --gameDir, /Users/<username>/Library/Application Support/minecraft, --assetsDir, /Users/<username>/Library/Application Support/minecraft/assets, --uuid, 8d0e3ad0782941869f7617fb8fd2556f, --username, <username>, --assetIndex, 1.15, --accessToken, ❄❄❄❄❄❄❄❄, --userType, legacy, --versionType, release] [02May2020 17:44:50.739] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Setting user: <username> [02May2020 17:45:06.295] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Backend library: LWJGL version 3.2.1 build 12 [02May2020 17:45:11.704] [modloading-worker-1/INFO] [obamiummod/]: Hello from Obamium Mod! [02May2020 17:45:11.750] [modloading-worker-3/INFO] [net.minecraftforge.common.ForgeMod/FORGEMOD]: Forge mod loading, version 31.1.0, for MC 1.15.2 with MCP 20200122.131323 [02May2020 17:45:11.750] [modloading-worker-3/INFO] [net.minecraftforge.common.MinecraftForge/FORGE]: MinecraftForge v31.1.0 Initialized [02May2020 17:45:13.436] [Render thread/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/]: Exception caught during firing event: net.minecraft.item.Food$Builder.effect(Ljava/util/function/Supplier;F)Lnet/minecraft/item/Food$Builder; Index: 2 Listeners: 0: NORMAL 1: net.minecraftforge.eventbus.EventBus$$Lambda$2047/2078175306@279ab15e 2: net.minecraftforge.eventbus.EventBus$$Lambda$2047/2078175306@571c2ed8 3: net.minecraftforge.eventbus.EventBus$$Lambda$2047/2078175306@5810772a 4: net.minecraftforge.eventbus.EventBus$$Lambda$2047/2078175306@4eacb6d1 5: ASM: class com.chubel.obamiummod.ModEventSubscriber onRegisterItems(Lnet/minecraftforge/event/RegistryEvent$Register;)V 6: LOWEST 7: ASM: class com.chubel.obamiummod.ModEventSubscriber registerEggs(Lnet/minecraftforge/event/RegistryEvent$Register;)V java.lang.NoSuchMethodError: net.minecraft.item.Food$Builder.effect(Ljava/util/function/Supplier;F)Lnet/minecraft/item/Food$Builder; at com.chubel.obamiummod.food.ModFoods.<clinit>(ModFoods.java:10) at com.chubel.obamiummod.init.ModItems.lambda$static$4(ModItems.java:35) at net.minecraftforge.registries.DeferredRegister.lambda$register$0(DeferredRegister.java:84) at net.minecraftforge.registries.DeferredRegister.addEntries(DeferredRegister.java:117) at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:212) at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:204) at net.minecraftforge.eventbus.EventBus.post(EventBus.java:258) at net.minecraftforge.fml.javafmlmod.FMLModContainer.fireEvent(FMLModContainer.java:106) at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) at net.minecraftforge.fml.ModContainer.transitionState(ModContainer.java:112) at net.minecraftforge.fml.ModList.lambda$dispatchSynchronousEvent$5(ModList.java:125) at java.util.ArrayList.forEach(ArrayList.java:1249) at net.minecraftforge.fml.ModList.dispatchSynchronousEvent(ModList.java:125) at net.minecraftforge.fml.ModList.lambda$static$1(ModList.java:96) at net.minecraftforge.fml.LifecycleEventProvider.dispatch(LifecycleEventProvider.java:71) at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:197) at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$24(ModLoader.java:189) at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:964) at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:189) at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$2(ClientModLoader.java:97) at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:113) at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:97) at net.minecraft.client.Minecraft.<init>(Minecraft.java:393) at net.minecraft.client.main.Main.main(SourceFile:166) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:56) at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [02May2020 17:45:13.447] [Render thread/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/LOADING]: Caught exception during event RegistryEvent.Register<minecraft:item> dispatch for modid obamiummod java.lang.NoSuchMethodError: net.minecraft.item.Food$Builder.effect(Ljava/util/function/Supplier;F)Lnet/minecraft/item/Food$Builder; at com.chubel.obamiummod.food.ModFoods.<clinit>(ModFoods.java:10) ~[?:1.15.2-0.1.0] at com.chubel.obamiummod.init.ModItems.lambda$static$4(ModItems.java:35) ~[?:1.15.2-0.1.0] at net.minecraftforge.registries.DeferredRegister.lambda$register$0(DeferredRegister.java:84) ~[?:?] at net.minecraftforge.registries.DeferredRegister.addEntries(DeferredRegister.java:117) ~[?:?] at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:212) ~[eventbus-2.0.0-milestone.1-service.jar:?] at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:204) ~[eventbus-2.0.0-milestone.1-service.jar:?] at net.minecraftforge.eventbus.EventBus.post(EventBus.java:258) ~[eventbus-2.0.0-milestone.1-service.jar:?] at net.minecraftforge.fml.javafmlmod.FMLModContainer.fireEvent(FMLModContainer.java:106) ~[?:31.1] at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) ~[?:1.8.0_74] at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) ~[?:1.8.0_74] at net.minecraftforge.fml.ModContainer.transitionState(ModContainer.java:112) ~[?:?] at net.minecraftforge.fml.ModList.lambda$dispatchSynchronousEvent$5(ModList.java:125) ~[?:?] at java.util.ArrayList.forEach(ArrayList.java:1249) ~[?:1.8.0_74] at net.minecraftforge.fml.ModList.dispatchSynchronousEvent(ModList.java:125) ~[?:?] at net.minecraftforge.fml.ModList.lambda$static$1(ModList.java:96) ~[?:?] at net.minecraftforge.fml.LifecycleEventProvider.dispatch(LifecycleEventProvider.java:71) ~[?:?] at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:197) ~[?:?] at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$24(ModLoader.java:189) ~[?:?] at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:964) ~[?:?] at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:189) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$2(ClientModLoader.java:97) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:113) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:97) ~[?:?] at net.minecraft.client.Minecraft.<init>(Minecraft.java:393) ~[?:?] at net.minecraft.client.main.Main.main(SourceFile:166) ~[1.15.2-forge-31.1.0.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_74] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_74] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_74] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_74] at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:56) ~[forge-1.15.2-31.1.0.jar:31.1] at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.0.0-milestone.4.jar:?] [02May2020 17:45:13.522] [Render thread/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: Failed to complete lifecycle event LOAD_REGISTRIES, 1 errors found [02May2020 17:45:13.522] [Render thread/FATAL] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: EventBus 0 shutting down - future events will not be posted. java.lang.Exception: stacktrace at net.minecraftforge.eventbus.EventBus.shutdown(EventBus.java:278) ~[eventbus-2.0.0-milestone.1-service.jar:?] at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:115) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:97) ~[?:?] at net.minecraft.client.Minecraft.<init>(Minecraft.java:393) ~[?:?] at net.minecraft.client.main.Main.main(SourceFile:166) ~[1.15.2-forge-31.1.0.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_74] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_74] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_74] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_74] at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:56) ~[forge-1.15.2-31.1.0.jar:31.1] at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.0.0-milestone.4.jar:?] [02May2020 17:45:18.262] [Render thread/INFO] [net.minecraft.resources.SimpleReloadableResourceManager/]: Reloading ResourceManager: Default, Mod Resources [02May2020 17:45:41.062] [Server-Worker-1/ERROR] [net.minecraftforge.fml.ModLoader/LOADING]: Skipping lifecycle event SETUP, 1 errors found. [02May2020 17:45:41.065] [Server-Worker-1/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: Failed to complete lifecycle event SETUP, 1 errors found [02May2020 17:45:41.066] [Server-Worker-1/FATAL] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: EventBus 0 shutting down - future events will not be posted. java.lang.Exception: stacktrace at net.minecraftforge.eventbus.EventBus.shutdown(EventBus.java:278) ~[eventbus-2.0.0-milestone.1-service.jar:?] at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:115) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.startModLoading(ClientModLoader.java:123) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.lambda$onreload$3(ClientModLoader.java:105) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:113) ~[?:?] at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626) [?:1.8.0_74] at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1618) [?:1.8.0_74] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_74] at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_74] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_74] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:1.8.0_74] [02May2020 17:45:46.919] [Server-Worker-2/ERROR] [net.minecraftforge.fml.ModLoader/LOADING]: Skipping lifecycle event ENQUEUE_IMC, 1 errors found. [02May2020 17:45:46.920] [Server-Worker-2/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: Failed to complete lifecycle event ENQUEUE_IMC, 1 errors found [02May2020 17:45:46.920] [Server-Worker-2/FATAL] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: EventBus 0 shutting down - future events will not be posted. java.lang.Exception: stacktrace at net.minecraftforge.eventbus.EventBus.shutdown(EventBus.java:278) ~[eventbus-2.0.0-milestone.1-service.jar:?] at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:115) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.finishModLoading(ClientModLoader.java:137) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.lambda$onreload$4(ClientModLoader.java:107) ~[?:?] at java.util.concurrent.CompletableFuture.uniRun(CompletableFuture.java:705) [?:1.8.0_74] at java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:687) [?:1.8.0_74] at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443) [?:1.8.0_74] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_74] at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_74] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_74] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:1.8.0_74] [02May2020 17:45:47.118] [Render thread/INFO] [net.minecraft.client.audio.SoundSystem/]: OpenAL initialized. [02May2020 17:45:47.122] [Render thread/INFO] [net.minecraft.client.audio.SoundEngine/SOUNDS]: Sound engine started [02May2020 17:45:47.815] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 1024x512x4 minecraft:textures/atlas/blocks.png-atlas [02May2020 17:45:47.833] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 128x128x4 minecraft:textures/atlas/signs.png-atlas [02May2020 17:45:47.834] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x512x4 minecraft:textures/atlas/banner_patterns.png-atlas [02May2020 17:45:47.835] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x512x4 minecraft:textures/atlas/shield_patterns.png-atlas [02May2020 17:45:47.837] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas [02May2020 17:45:47.837] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas [02May2020 17:45:47.840] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas [02May2020 17:45:49.359] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x0 minecraft:textures/atlas/particles.png-atlas [02May2020 17:45:49.361] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x0 minecraft:textures/atlas/paintings.png-atlas [02May2020 17:45:49.362] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 128x128x0 minecraft:textures/atlas/mob_effects.png-atlas [02May2020 17:46:32.673] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Stopping! I would greatly appreciate some help. Thanks in advance! btw: (yes, it is a mod about obamium. I hope it makes you laugh) Edited May 3, 2020 by chubel10 Quote Link to comment Share on other sites More sharing options...
Azaka7 Posted May 3, 2020 Share Posted May 3, 2020 Did you install the same version of Forge to the client as you used when making your mod? The error log is referencing Food.Builder.effect(Supplier,float). That method was changed in Forge build 1.15.2-31.1.5, which might be what's causing conflict if you're using different versions. 1 Quote Link to comment Share on other sites More sharing options...
chubel10 Posted May 3, 2020 Author Share Posted May 3, 2020 Thank you for your help and I wish that would've fixed it but I updated my code to the latest forge and also changed the client to the same version and now I get this: Spoiler [03May2020 12:14:35.739] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, <username>, --version, 1.15.2-forge-31.1.63, --gameDir, /Users/<username>/Library/Application Support/minecraft, --assetsDir, /Users/<username>/Library/Application Support/minecraft/assets, --assetIndex, 1.15, --uuid, 8d0e3ad0782941869f7617fb8fd2556f, --accessToken, ❄❄❄❄❄❄❄❄, --userType, legacy, --versionType, release, --launchTarget, fmlclient, --fml.forgeVersion, 31.1.63, --fml.mcVersion, 1.15.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20200414.225201] [03May2020 12:14:35.744] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 5.1.0+69+master.79f13f7 starting: java version 1.8.0_74 by Oracle Corporation [03May2020 12:14:36.424] [main/INFO] [net.minecraftforge.fml.loading.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust [03May2020 12:14:38.302] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmlclient' with arguments [--version, 1.15.2-forge-31.1.63, --gameDir, /Users/<username>/Library/Application Support/minecraft, --assetsDir, /Users/<username>/Library/Application Support/minecraft/assets, --uuid, 8d0e3ad0782941869f7617fb8fd2556f, --username, <username>, --assetIndex, 1.15, --accessToken, ❄❄❄❄❄❄❄❄, --userType, legacy, --versionType, release] [03May2020 12:14:41.115] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Setting user: <username> [03May2020 12:14:53.626] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Backend library: LWJGL version 3.2.1 build 12 [03May2020 12:14:54.738] [modloading-worker-1/INFO] [obamiummod/]: Hello from Obamium Mod! [03May2020 12:14:54.742] [modloading-worker-3/INFO] [net.minecraftforge.common.ForgeMod/FORGEMOD]: Forge mod loading, version 31.1.63, for MC 1.15.2 with MCP 20200414.225201 [03May2020 12:14:54.743] [modloading-worker-3/INFO] [net.minecraftforge.common.MinecraftForge/FORGE]: MinecraftForge v31.1.63 Initialized [03May2020 12:14:55.454] [Render thread/ERROR] [net.minecraftforge.fml.common.ObfuscationReflectionHelper/REFLECTION]: Unable to locate field EGGS (EGGS) on type net.minecraft.item.SpawnEggItem net.minecraftforge.fml.common.ObfuscationReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: EGGS at net.minecraftforge.fml.common.ObfuscationReflectionHelper.findField(ObfuscationReflectionHelper.java:242) ~[?:?] at net.minecraftforge.fml.common.ObfuscationReflectionHelper.getPrivateValue(ObfuscationReflectionHelper.java:87) ~[?:?] at com.chubel.obamiummod.item.ModSpawnEgg.<clinit>(ModSpawnEgg.java:28) ~[?:1.15.2-0.1.0] at com.chubel.obamiummod.init.ModItems.lambda$static$5(ModItems.java:38) ~[?:1.15.2-0.1.0] at net.minecraftforge.registries.DeferredRegister.lambda$register$0(DeferredRegister.java:84) ~[?:?] at net.minecraftforge.registries.DeferredRegister.addEntries(DeferredRegister.java:117) ~[?:?] at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:212) ~[eventbus-2.1.0-service.jar:?] at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:204) ~[eventbus-2.1.0-service.jar:?] at net.minecraftforge.eventbus.EventBus.post(EventBus.java:258) ~[eventbus-2.1.0-service.jar:?] at net.minecraftforge.fml.javafmlmod.FMLModContainer.fireEvent(FMLModContainer.java:106) ~[?:31.1] at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) ~[?:1.8.0_74] at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) ~[?:1.8.0_74] at net.minecraftforge.fml.ModContainer.transitionState(ModContainer.java:112) ~[?:?] at net.minecraftforge.fml.ModList.lambda$dispatchSynchronousEvent$5(ModList.java:126) ~[?:?] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) ~[?:1.8.0_74] at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) ~[?:1.8.0_74] at net.minecraftforge.fml.ModList.dispatchSynchronousEvent(ModList.java:126) ~[?:?] at net.minecraftforge.fml.ModList.lambda$static$1(ModList.java:96) ~[?:?] at net.minecraftforge.fml.LifecycleEventProvider.dispatch(LifecycleEventProvider.java:71) ~[?:?] at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:214) ~[?:?] at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$25(ModLoader.java:206) ~[?:?] at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:971) ~[?:?] at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:206) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$2(ClientModLoader.java:97) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:113) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:97) ~[?:?] at net.minecraft.client.Minecraft.<init>(Minecraft.java:392) ~[?:?] at net.minecraft.client.main.Main.main(SourceFile:166) ~[1.15.2-forge-31.1.63.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_74] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_74] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_74] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_74] at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:56) ~[forge-1.15.2-31.1.63.jar:31.1] at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.1.0.jar:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.1.0.jar:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.1.0.jar:?] at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.1.0.jar:?] at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.1.0.jar:?] Caused by: java.lang.NoSuchFieldException: EGGS at java.lang.Class.getDeclaredField(Class.java:2070) ~[?:1.8.0_74] at net.minecraftforge.fml.common.ObfuscationReflectionHelper.findField(ObfuscationReflectionHelper.java:236) ~[?:?] ... 37 more [03May2020 12:14:55.459] [Render thread/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/]: Exception caught during firing event: null Index: 2 Listeners: 0: NORMAL 1: net.minecraftforge.eventbus.EventBus$$Lambda$2060/2113989903@a62c7cd 2: net.minecraftforge.eventbus.EventBus$$Lambda$2060/2113989903@7661b5a 3: net.minecraftforge.eventbus.EventBus$$Lambda$2060/2113989903@7c36db44 4: net.minecraftforge.eventbus.EventBus$$Lambda$2060/2113989903@65c33b92 5: ASM: class com.chubel.obamiummod.ModEventSubscriber onRegisterItems(Lnet/minecraftforge/event/RegistryEvent$Register;)V 6: LOWEST 7: ASM: class com.chubel.obamiummod.ModEventSubscriber registerEggs(Lnet/minecraftforge/event/RegistryEvent$Register;)V java.lang.ExceptionInInitializerError at com.chubel.obamiummod.init.ModItems.lambda$static$5(ModItems.java:38) at net.minecraftforge.registries.DeferredRegister.lambda$register$0(DeferredRegister.java:84) at net.minecraftforge.registries.DeferredRegister.addEntries(DeferredRegister.java:117) at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:212) at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:204) at net.minecraftforge.eventbus.EventBus.post(EventBus.java:258) at net.minecraftforge.fml.javafmlmod.FMLModContainer.fireEvent(FMLModContainer.java:106) at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) at net.minecraftforge.fml.ModContainer.transitionState(ModContainer.java:112) at net.minecraftforge.fml.ModList.lambda$dispatchSynchronousEvent$5(ModList.java:126) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) at net.minecraftforge.fml.ModList.dispatchSynchronousEvent(ModList.java:126) at net.minecraftforge.fml.ModList.lambda$static$1(ModList.java:96) at net.minecraftforge.fml.LifecycleEventProvider.dispatch(LifecycleEventProvider.java:71) at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:214) at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$25(ModLoader.java:206) at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:971) at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:206) at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$2(ClientModLoader.java:97) at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:113) at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:97) at net.minecraft.client.Minecraft.<init>(Minecraft.java:392) at net.minecraft.client.main.Main.main(SourceFile:166) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:56) at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) Caused by: net.minecraftforge.fml.common.ObfuscationReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: EGGS at net.minecraftforge.fml.common.ObfuscationReflectionHelper.findField(ObfuscationReflectionHelper.java:242) at net.minecraftforge.fml.common.ObfuscationReflectionHelper.getPrivateValue(ObfuscationReflectionHelper.java:87) at com.chubel.obamiummod.item.ModSpawnEgg.<clinit>(ModSpawnEgg.java:28) ... 35 more Caused by: java.lang.NoSuchFieldException: EGGS at java.lang.Class.getDeclaredField(Class.java:2070) at net.minecraftforge.fml.common.ObfuscationReflectionHelper.findField(ObfuscationReflectionHelper.java:236) ... 37 more [03May2020 12:14:55.469] [Render thread/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/LOADING]: Caught exception during event RegistryEvent.Register<minecraft:item> dispatch for modid obamiummod java.lang.ExceptionInInitializerError: null at com.chubel.obamiummod.init.ModItems.lambda$static$5(ModItems.java:38) ~[?:1.15.2-0.1.0] at net.minecraftforge.registries.DeferredRegister.lambda$register$0(DeferredRegister.java:84) ~[?:?] at net.minecraftforge.registries.DeferredRegister.addEntries(DeferredRegister.java:117) ~[?:?] at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:212) ~[eventbus-2.1.0-service.jar:?] at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:204) ~[eventbus-2.1.0-service.jar:?] at net.minecraftforge.eventbus.EventBus.post(EventBus.java:258) ~[eventbus-2.1.0-service.jar:?] at net.minecraftforge.fml.javafmlmod.FMLModContainer.fireEvent(FMLModContainer.java:106) ~[?:31.1] at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) ~[?:1.8.0_74] at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) ~[?:1.8.0_74] at net.minecraftforge.fml.ModContainer.transitionState(ModContainer.java:112) ~[?:?] at net.minecraftforge.fml.ModList.lambda$dispatchSynchronousEvent$5(ModList.java:126) ~[?:?] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) ~[?:1.8.0_74] at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) ~[?:1.8.0_74] at net.minecraftforge.fml.ModList.dispatchSynchronousEvent(ModList.java:126) ~[?:?] at net.minecraftforge.fml.ModList.lambda$static$1(ModList.java:96) ~[?:?] at net.minecraftforge.fml.LifecycleEventProvider.dispatch(LifecycleEventProvider.java:71) ~[?:?] at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:214) ~[?:?] at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$25(ModLoader.java:206) ~[?:?] at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:971) ~[?:?] at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:206) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$2(ClientModLoader.java:97) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:113) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:97) ~[?:?] at net.minecraft.client.Minecraft.<init>(Minecraft.java:392) ~[?:?] at net.minecraft.client.main.Main.main(SourceFile:166) ~[1.15.2-forge-31.1.63.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_74] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_74] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_74] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_74] at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:56) ~[forge-1.15.2-31.1.63.jar:31.1] at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.1.0.jar:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.1.0.jar:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.1.0.jar:?] at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.1.0.jar:?] at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.1.0.jar:?] Caused by: net.minecraftforge.fml.common.ObfuscationReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: EGGS at net.minecraftforge.fml.common.ObfuscationReflectionHelper.findField(ObfuscationReflectionHelper.java:242) ~[?:?] at net.minecraftforge.fml.common.ObfuscationReflectionHelper.getPrivateValue(ObfuscationReflectionHelper.java:87) ~[?:?] at com.chubel.obamiummod.item.ModSpawnEgg.<clinit>(ModSpawnEgg.java:28) ~[?:1.15.2-0.1.0] ... 35 more Caused by: java.lang.NoSuchFieldException: EGGS at java.lang.Class.getDeclaredField(Class.java:2070) ~[?:1.8.0_74] at net.minecraftforge.fml.common.ObfuscationReflectionHelper.findField(ObfuscationReflectionHelper.java:236) ~[?:?] at net.minecraftforge.fml.common.ObfuscationReflectionHelper.getPrivateValue(ObfuscationReflectionHelper.java:87) ~[?:?] at com.chubel.obamiummod.item.ModSpawnEgg.<clinit>(ModSpawnEgg.java:28) ~[?:1.15.2-0.1.0] ... 35 more [03May2020 12:14:55.471] [Render thread/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: Failed to complete lifecycle event LOAD_REGISTRIES, 1 errors found [03May2020 12:14:55.471] [Render thread/FATAL] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: EventBus 0 shutting down - future events will not be posted. java.lang.Exception: stacktrace at net.minecraftforge.eventbus.EventBus.shutdown(EventBus.java:278) ~[eventbus-2.1.0-service.jar:?] at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:115) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:97) ~[?:?] at net.minecraft.client.Minecraft.<init>(Minecraft.java:392) ~[?:?] at net.minecraft.client.main.Main.main(SourceFile:166) ~[1.15.2-forge-31.1.63.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_74] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_74] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_74] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_74] at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:56) ~[forge-1.15.2-31.1.63.jar:31.1] at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.1.0.jar:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.1.0.jar:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.1.0.jar:?] at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.1.0.jar:?] at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.1.0.jar:?] [03May2020 12:15:00.384] [Render thread/INFO] [net.minecraft.resources.SimpleReloadableResourceManager/]: Reloading ResourceManager: Default, Mod Resources [03May2020 12:15:01.081] [Server-Worker-2/ERROR] [net.minecraftforge.fml.ModLoader/LOADING]: Skipping lifecycle event SETUP, 1 errors found. [03May2020 12:15:01.081] [Server-Worker-2/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: Failed to complete lifecycle event SETUP, 1 errors found [03May2020 12:15:01.082] [Server-Worker-2/FATAL] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: EventBus 0 shutting down - future events will not be posted. java.lang.Exception: stacktrace at net.minecraftforge.eventbus.EventBus.shutdown(EventBus.java:278) ~[eventbus-2.1.0-service.jar:?] at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:115) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.startModLoading(ClientModLoader.java:123) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.lambda$onreload$3(ClientModLoader.java:105) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:113) ~[?:?] at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626) [?:1.8.0_74] at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1618) [?:1.8.0_74] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_74] at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_74] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_74] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:1.8.0_74] [03May2020 12:15:35.251] [Server-Worker-3/ERROR] [net.minecraftforge.fml.ModLoader/LOADING]: Skipping lifecycle event ENQUEUE_IMC, 1 errors found. [03May2020 12:15:35.253] [Server-Worker-3/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: Failed to complete lifecycle event ENQUEUE_IMC, 1 errors found [03May2020 12:15:35.253] [Server-Worker-3/FATAL] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: EventBus 0 shutting down - future events will not be posted. java.lang.Exception: stacktrace at net.minecraftforge.eventbus.EventBus.shutdown(EventBus.java:278) ~[eventbus-2.1.0-service.jar:?] at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:115) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.finishModLoading(ClientModLoader.java:137) ~[?:?] at net.minecraftforge.fml.client.ClientModLoader.lambda$onreload$4(ClientModLoader.java:107) ~[?:?] at java.util.concurrent.CompletableFuture.uniRun(CompletableFuture.java:705) [?:1.8.0_74] at java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:687) [?:1.8.0_74] at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443) [?:1.8.0_74] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_74] at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_74] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_74] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:1.8.0_74] [03May2020 12:15:35.804] [Render thread/INFO] [net.minecraft.client.audio.SoundSystem/]: OpenAL initialized. [03May2020 12:15:35.809] [Render thread/INFO] [net.minecraft.client.audio.SoundEngine/SOUNDS]: Sound engine started [03May2020 12:15:37.214] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 1024x512x4 minecraft:textures/atlas/blocks.png-atlas [03May2020 12:15:37.233] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 128x128x4 minecraft:textures/atlas/signs.png-atlas [03May2020 12:15:37.234] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x512x4 minecraft:textures/atlas/banner_patterns.png-atlas [03May2020 12:15:37.236] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x512x4 minecraft:textures/atlas/shield_patterns.png-atlas [03May2020 12:15:37.238] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas [03May2020 12:15:37.239] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas [03May2020 12:15:37.240] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas [03May2020 12:15:38.235] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x0 minecraft:textures/atlas/particles.png-atlas [03May2020 12:15:38.238] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x0 minecraft:textures/atlas/paintings.png-atlas [03May2020 12:15:38.239] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 128x128x0 minecraft:textures/atlas/mob_effects.png-atlas [03May2020 12:16:07.785] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Stopping! This is referring to this part of my code: private static final Map<EntityType<?>, SpawnEggItem> EGGS = ObfuscationReflectionHelper.getPrivateValue(SpawnEggItem.class, null, "EGGS"); But it works fine in my workspace (which is now the same version). I would really appreciate the help! Quote Link to comment Share on other sites More sharing options...
chubel10 Posted May 3, 2020 Author Share Posted May 3, 2020 58 minutes ago, diesieben07 said: When referencing minecraft fields and methods using reflection you need to provide the SRG name. Hello, diesieben07 thanks for answering. I'm not familiar with the concept of SRG names would you care to explain please? 1 hour ago, diesieben07 said: However, please explain why you need access to this field? Surely! Since I'm making a spawn egg, I can't register an item that references an entity because of the order in which entities and items are loaded so I created a method to register only the spawn eggs at lowest priority once entities have already been loaded like so: @SubscribeEvent(priority = EventPriority.LOWEST) public static void registerEggs(RegistryEvent.Register<EntityType<?>> event) { ModSpawnEgg.registerEggs(); } This method adds my spawn egg to the field I used reflection to get in order to load it. Here is the code to the class in case you want to see: Spoiler package com.chubel.obamiummod.item; import java.util.ArrayList; import java.util.Map; import javax.annotation.Nullable; import com.google.common.base.Supplier; import net.minecraft.block.DispenserBlock; import net.minecraft.dispenser.DefaultDispenseItemBehavior; import net.minecraft.dispenser.IBlockSource; import net.minecraft.entity.EntityType; import net.minecraft.entity.SpawnReason; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.SpawnEggItem; import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.Direction; import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.fml.common.ObfuscationReflectionHelper; public class ModSpawnEgg extends SpawnEggItem{ protected static ArrayList<ModSpawnEgg> eggsToAdd = new ArrayList<>(); private final Supplier<EntityType<?>> TYPE_SUPPLIER; private static final Map<EntityType<?>, SpawnEggItem> EGGS = ObfuscationReflectionHelper.getPrivateValue(SpawnEggItem.class, null, "EGGS"); public ModSpawnEgg(RegistryObject<? extends EntityType<?>> ObjIn, int primaryColorIn, int secondaryColorIn, Item.Properties builder) { super(null, primaryColorIn, secondaryColorIn, builder); this.TYPE_SUPPLIER = ObjIn::get; eggsToAdd.add(this); } public static void registerEggs() { DefaultDispenseItemBehavior defaultDispenseItemBehavior = new DefaultDispenseItemBehavior() { /** * Dispense the specified stack, play the dispense sound and spawn particles. */ public ItemStack dispenseStack(IBlockSource source, ItemStack stack) { Direction direction = source.getBlockState().get(DispenserBlock.FACING); EntityType<?> entitytype = ((SpawnEggItem)stack.getItem()).getType(null); entitytype.spawn(source.getWorld(), stack, (PlayerEntity)null, source.getBlockPos().offset(direction), SpawnReason.DISPENSER, direction != Direction.UP, false); stack.shrink(1); return stack; } }; eggsToAdd.forEach( (value) ->{EGGS.put(value.getType(null), value); DispenserBlock.registerDispenseBehavior(value, defaultDispenseItemBehavior); }); eggsToAdd.clear(); } @Override public EntityType<?> getType(@Nullable CompoundNBT compoundNBT){ // return entityTypeSupplier.get(); return TYPE_SUPPLIER.get(); } } I must mention that this code is not original but I got this concept by reading into cadiboo's example mod. Do you by any chance know another method for registering spawn eggs? Again, thanks for the reply and I hope you can continue to help me! Quote Link to comment Share on other sites More sharing options...
chubel10 Posted May 3, 2020 Author Share Posted May 3, 2020 But the SpawnEggItem constructor takes in an argument of type EntityType<?>. This means that if I want to do super(typeIn, primaryColorIn, secondaryColorIn, builder); () my first argument must be ModEntities.<entity-name>.get() as I am using the deferred register for my entities. In doing this I cause a Registry Object not present exception because items are loaded before entities. How can I get around this without adding things to the map manually? I really appreciate the help and hope you can help me figure this out. Quote Link to comment Share on other sites More sharing options...
chubel10 Posted May 3, 2020 Author Share Posted May 3, 2020 5 hours ago, diesieben07 said: When referencing minecraft fields and methods using reflection you need to provide the SRG name. Also, regarding this, is there a way to check the SRG equivalent to and MCP name? And If the answer is to use the MCPbot do you know of any tutorial or forum topic that discusses this? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
chubel10 Posted May 4, 2020 Author Share Posted May 4, 2020 8 hours ago, diesieben07 said: You can create the entity type in the item event, but not register it until the proper registry event comes around. I will try this and get back. Thank you! Quote Link to comment Share on other sites More sharing options...
chubel10 Posted May 4, 2020 Author Share Posted May 4, 2020 So by doing this I have to create a static reference to my entity now for things like the rendering of the model correct? So I have to make a new class with the @ObjectHolder annotation just for this one entity? I don't mean to sound presumptuous but why are you dissuading me from registering to the map directly? It just seems unnecessary to do the former. This is a genuine question. Im curious to see your reasoning. Or maybe there's an easier way to do it without the @ObjectHolder classthat I don't know about. Anyway, thank you for your help! Quote Link to comment Share on other sites More sharing options...
chubel10 Posted May 4, 2020 Author Share Posted May 4, 2020 4 minutes ago, diesieben07 said: You can still use RegistryObject. Sometimes hacking into privates of classes using reflection and/or access transformers is needed. But if it isn't (like here) it should not be done. Thank you very much for your fast response! I'm afraid that to my knowledge I can't use RegistryObject as a static reference to my EntityType because I need to do the .get() in order to access the EntityType needed elsewhere which causes the Registry Object not present error becuase it's lacking registration (I'm sorry if i'm missing something) Quote Link to comment Share on other sites More sharing options...
chubel10 Posted May 4, 2020 Author Share Posted May 4, 2020 Thank you! that's fixed now. My egg spawns a pig instead now which is weird but thank you for everything else! Quote Link to comment Share on other sites More sharing options...
chubel10 Posted May 4, 2020 Author Share Posted May 4, 2020 I checked and it apparently is a pig (I used F3 and it said what the image said). As for my code: https://github.com/Chubel10/ObamiumMod Thank you for taking the time! Quote Link to comment Share on other sites More sharing options...
chubel10 Posted May 4, 2020 Author Share Posted May 4, 2020 Apparently even with that tag being that of the minecraft:pig i think it IS only client-side because it's making the noises of my entity Quote Link to comment Share on other sites More sharing options...
chubel10 Posted May 4, 2020 Author Share Posted May 4, 2020 Sorry for taking so long to reply, I was checking the natural spawn of the entity. And by the way it's solved! thank you so much! Here's my new code (It might not be very good practice what I did) : https://github.com/Chubel10/ObamiumMod/blob/master/src/main/java/com/chubel/obamiummod/init/ModEntities.java Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.