Jump to content

Recommended Posts

Posted

Hi all, I have recently started becoming a minecraft modder, and I have the basics down. Adding items and all that stuff. I recently moved into adding custom fluids which I was able to achieve. I am stuck on adding a bucket that can pick up and place my fluid. I have followed the tutorial provided by MinecraftForge, but it still doesn't work. I also went as far as referencing from the BuildCraft code. I'm pretty sure I am overlooking something small, but can't figure out what it is. I have already debugged enough NPEs to know where to start, but I am not sure what is causing this one. I have taken a look at the FluidRegistry and Fluid stuff with Minecraft Forge.

 

The source files can be found here:

https://github.com/calebty1/Caleb-Mod-G2G

 

The Crash Report:

---- Minecraft Crash Report ----
// Everything's going to plan. No, really, that was supposed to happen.

Time: 5/26/14 6:55 PM
Description: Initializing game

java.lang.RuntimeException: Invalid FluidContainerData - a parameter was null.
at net.minecraftforge.fluids.FluidContainerRegistry$FluidContainerData.<init>(FluidContainerRegistry.java:303)
at net.minecraftforge.fluids.FluidContainerRegistry$FluidContainerData.<init>(FluidContainerRegistry.java:292)
at net.minecraftforge.fluids.FluidContainerRegistry.registerFluidContainer(FluidContainerRegistry.java:103)
at calebty1.random.common.TutorialMod.load(TutorialMod.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:209)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:500)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:202)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:520)
at net.minecraft.client.Minecraft.run(Minecraft.java:890)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


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

-- Head --
Stacktrace:
at net.minecraftforge.fluids.FluidContainerRegistry$FluidContainerData.<init>(FluidContainerRegistry.java:303)
at net.minecraftforge.fluids.FluidContainerRegistry$FluidContainerData.<init>(FluidContainerRegistry.java:292)
at net.minecraftforge.fluids.FluidContainerRegistry.registerFluidContainer(FluidContainerRegistry.java:103)
at calebty1.random.common.TutorialMod.load(TutorialMod.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:209)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:500)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:202)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:520)

-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.run(Minecraft.java:890)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_55, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 867308408 bytes (827 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.01-pre FML v7.2.156.1060 Minecraft Forge 10.12.1.1060 4 mods loaded, 4 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
FML{7.2.156.1060} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.1.1060.jar) Unloaded->Constructed->Pre-initialized
Forge{10.12.1.1060} [Minecraft Forge] (forgeSrc-1.7.2-10.12.1.1060.jar) Unloaded->Constructed->Pre-initialized
TutorialMod{1.0.5 ALPHA} [TutorialMod] (bin) Unloaded->Constructed->Errored
Launched Version: 1.6
LWJGL: 2.9.0
OpenGL: GeForce GTX 550 Ti/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: []
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
Anisotropic Filtering: Off (1)</script>

 

Like I said I know exactly where it's coming from, but I don't quite know why it's returning null. Something with this line perhaps?:

        if (!fluidIDs.containsKey(fluidName))
        {
            return null;
        }

Anyways, I will leave it up to you to try and figure out. Thanks :).

Posted

It's a matter of case in FLuid names. They are internally converted to lower case. That cannot be found by GetFluidStack except in lower case. So, you get a null for the fuild.

 

There should be some documentation about that, as it is a very common crash.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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