iconmaster5326 / AetherCraft

A fork of Graknol's Energy Manipulator mod. Turn matter into other kinds of matter today!
5 stars 3 forks source link

ClassCastException in nei handler when looking up fluids #26

Closed bdew closed 10 years ago

bdew commented 10 years ago

Example crash: http://pastebin.com/gZhBnf24

https://github.com/iconmaster5326/AetherCraft/blob/master/src/main/java/com/iconmaster/aec/nei/NEIInfuserHandler.java#L89

You should check that the parameter is really an ItemStack and/or that the inputId is "item".

"liquid" with a FluidStack as parameter is used by multiple mods, including Gendustry and NEI Plugins.

iconmaster5326 commented 10 years ago

I didn't know it could take FluidStacks like that, so thanks for informing me. Also, thanks for the very specific bugfix.

Anyways, fixed with commit 0bbb12944f78697414a94b285c85cd1cd51e076d.

bdew commented 10 years ago

You're welcome. This have become a kind of de-facto standard with handling machines that produce/consume fluids in NEI.

I don't think you need the elseif there, you will be looking for the in-world block of that liquid in recipes and it really has no reason to be in them (they aren't obtainable as items in real gameplay).

If you have machines producing/consuming fluids you could use this to show uses for fluids.