Jump to content

[1.17.1] Having trouble creating a MobBucketItem


TheRustyTitan

Recommended Posts

Hi, I'm a new modder. I'm having some trouble creating a mob bucket item, and I would really appreciate some help.

Here is the error message:

The constructor MobBucketItem(RegistryObject<EntityType<Eel>>, FlowingFluid, SoundEvent, Item.Properties) is undefined

Here is the code:

public static final RegistryObject<MobBucketItem> EEL_BUCKET = ITEMS.register("eel_bucket", () -> new MobBucketItem(EntityInit.EEL, Fluids.WATER, SoundEvents.BUCKET_EMPTY_FISH, (new Item.Properties().tab(CreativeModeTab.TAB_MISC))));

Putting a .get() after EntityInit.EEL fixes the error, but the game crashes when I try to load it. 

Spoiler

---- Minecraft Crash Report ----
// Why did you do that?

Time: 4/16/22, 5:00 PM
Description: Mod loading error has occurred

java.lang.Exception: Mod Loading has failed
    at net.minecraftforge.fmllegacy.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:69) ~[forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.jar%2374%2380!:?] {re:classloading}
    at net.minecraftforge.fmlclient.ClientModLoader.completeModLoading(ClientModLoader.java:185) ~[forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.jar%2374%2380!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.lambda$new$1(Minecraft.java:555) ~[forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.jar%2375!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.Util.ifElse(Util.java:361) ~[forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.jar%2375!:?] {re:classloading}
    at net.minecraft.client.Minecraft.lambda$new$2(Minecraft.java:549) ~[forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.jar%2375!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.gui.screens.LoadingOverlay.render(LoadingOverlay.java:135) ~[forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.jar%2375!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:874) ~[forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.jar%2375!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1039) ~[forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.jar%2375!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.run(Minecraft.java:659) ~[forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.jar%2375!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:186) ~[forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.jar%2375!:?] {re:classloading,pl:runtimedistcleaner:A}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?] {}
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
    at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] {}
    at net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:38) ~[fmlloader-1.17.1-37.1.1.jar%233!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.24.jar%238!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.24.jar%238!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.24.jar%238!:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.24.jar%238!:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.24.jar%238!:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.24.jar%238!:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.24.jar%238!:?] {}
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90) [bootstraplauncher-0.1.17.jar:?] {}


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
    at java.util.Objects.requireNonNull(Objects.java:334) ~[?:?] {}
-- MOD thedeepblue --
Details:
    Mod File: main
    Failure message: The Deep Blue (thedeepblue) encountered an error during the common_setup event phase
        java.lang.NullPointerException: Registry Object not present: thedeepblue:eel
    Mod Version: 1.0
    Mod Issue URL: NOT PROVIDED
    Exception message: java.lang.NullPointerException: Registry Object not present: thedeepblue:eel
Stacktrace:
    at java.util.Objects.requireNonNull(Objects.java:334) ~[?:?] {}
    at net.minecraftforge.fmllegacy.RegistryObject.get(RegistryObject.java:120) ~[forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.jar%2374%2380!:?] {re:classloading}
    at com.therustytitanyt.thedeepblue.core.init.ItemInit.lambda$5(ItemInit.java:43) ~[%2379!:?] {re:classloading}
    at net.minecraftforge.registries.DeferredRegister.lambda$register$0(DeferredRegister.java:121) ~[forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.jar%2374%2380!:?] {re:classloading}
    at net.minecraftforge.registries.DeferredRegister.addEntries(DeferredRegister.java:197) ~[forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.jar%2374%2380!:?] {re:classloading}
    at net.minecraftforge.registries.DeferredRegister$EventDispatcher.handleEvent(DeferredRegister.java:169) ~[forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.jar%2374%2380!:?] {re:classloading}
    at net.minecraftforge.eventbus.ASMEventHandler_0_EventDispatcher_handleEvent_Register.invoke(.dynamic) ~[?:?] {}
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-5.0.7.jar%237!:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-5.0.7.jar%237!:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-5.0.7.jar%237!:?] {}
    at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:120) ~[javafmllanguage-1.17.1-37.1.1.jar%2376!:?] {}
    at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:121) ~[fmlcore-1.17.1-37.1.1.jar%2378!:?] {}
    at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1800) ~[?:?] {}
    at net.minecraftforge.fml.ModWorkManager$SyncExecutor.driveOne(ModWorkManager.java:56) ~[fmlcore-1.17.1-37.1.1.jar%2378!:?] {}
    at net.minecraftforge.fml.ModWorkManager$DrivenExecutor.drive(ModWorkManager.java:40) ~[fmlcore-1.17.1-37.1.1.jar%2378!:?] {}
    at net.minecraftforge.fml.ModLoader.waitForTransition(ModLoader.java:216) ~[fmlcore-1.17.1-37.1.1.jar%2378!:?] {}
    at net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$21(ModLoader.java:201) ~[fmlcore-1.17.1-37.1.1.jar%2378!:?] {}
    at java.util.Optional.ifPresent(Optional.java:178) ~[?:?] {}
    at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:201) ~[fmlcore-1.17.1-37.1.1.jar%2378!:?] {}
    at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$11(ModLoader.java:178) ~[fmlcore-1.17.1-37.1.1.jar%2378!:?] {}
    at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {}
    at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:178) ~[fmlcore-1.17.1-37.1.1.jar%2378!:?] {}
    at net.minecraftforge.fmlclient.ClientModLoader.lambda$begin$1(ClientModLoader.java:108) ~[forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.jar%2374%2380!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraftforge.fmlclient.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:129) ~[forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.jar%2374%2380!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraftforge.fmlclient.ClientModLoader.begin(ClientModLoader.java:108) ~[forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.jar%2374%2380!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:460) ~[forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.jar%2375!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:151) ~[forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.jar%2375!:?] {re:classloading,pl:runtimedistcleaner:A}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?] {}
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
    at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] {}
    at net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:38) ~[fmlloader-1.17.1-37.1.1.jar%233!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.24.jar%238!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.24.jar%238!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.24.jar%238!:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.24.jar%238!:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.24.jar%238!:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.24.jar%238!:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.24.jar%238!:?] {}
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90) [bootstraplauncher-0.1.17.jar:?] {}


-- System Details --
Details:
    Minecraft Version: 1.17.1
    Minecraft Version ID: 1.17.1
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 16.0.2, Eclipse Foundation
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), Eclipse Foundation
    Memory: 702524704 bytes (669 MiB) / 1147142144 bytes (1094 MiB) up to 2088763392 bytes (1992 MiB)
    CPUs: 8
    Processor Vendor: GenuineIntel
    Processor Name: Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz
    Identifier: Intel64 Family 6 Model 165 Stepping 2
    Microarchitecture: unknown
    Frequency (GHz): 2.50
    Number of physical packages: 1
    Number of physical CPUs: 4
    Number of logical CPUs: 8
    Graphics card #0 name: NVIDIA GeForce GTX 1660 Ti with Max-Q Design
    Graphics card #0 vendor: NVIDIA (0x10de)
    Graphics card #0 VRAM (MB): 4095.00
    Graphics card #0 deviceId: 0x2191
    Graphics card #0 versionInfo: DriverVersion=30.0.14.9733
    Graphics card #1 name: Intel(R) UHD Graphics
    Graphics card #1 vendor: Intel Corporation (0x8086)
    Graphics card #1 VRAM (MB): 1024.00
    Graphics card #1 deviceId: 0x9bc4
    Graphics card #1 versionInfo: DriverVersion=27.20.100.8476
    Memory slot #0 capacity (MB): 4096.00
    Memory slot #0 clockSpeed (GHz): 3.20
    Memory slot #0 type: DDR4
    Memory slot #1 capacity (MB): 4096.00
    Memory slot #1 clockSpeed (GHz): 3.20
    Memory slot #1 type: DDR4
    Virtual memory max (MB): 14106.16
    Virtual memory used (MB): 11011.21
    Swap memory total (MB): 6144.00
    Swap memory used (MB): 483.55
    JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -XX:+ShowCodeDetailsInExceptionMessages
    ModLauncher: 9.0.24+9.0.24+main.7be9f01d
    ModLauncher launch target: forgeclientuserdev
    ModLauncher naming: mcp
    ModLauncher services: 
         mixin PLUGINSERVICE 
         eventbus PLUGINSERVICE 
         object_holder_definalize PLUGINSERVICE 
         runtime_enum_extender PLUGINSERVICE 
         capability_token_subclass PLUGINSERVICE 
         capability_inject_definalize PLUGINSERVICE 
         accesstransformer PLUGINSERVICE 
         runtimedistcleaner PLUGINSERVICE 
         mixin TRANSFORMATIONSERVICE 
         fml TRANSFORMATIONSERVICE 
    FML Language Providers: 
        [email protected]
        javafml@null
    Mod List: 
        forge-1.17.1-37.1.1_mapped_official_1.17.1-recomp.|Minecraft                     |minecraft                     |1.17.1              |COMMON_SET|Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f
        main                                              |The Deep Blue                 |thedeepblue                   |1.0                 |ERROR     |Manifest: NOSIGNATURE
                                                          |Forge                         |forge                         |37.1.1              |COMMON_SET|Manifest: NOSIGNATURE
    Crash Report UUID: fefa7eb8-1386-4abe-a484-b1c7a6b95661
    FML: 37.1
    Forge: net.minecraftforge:37.1.1

 

Edited by TheRustyTitan
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.