Bug in combustion engine handler

Issue #90 resolved
Former user created an issue

The classes IronEngineFuelsHandler.IronEngineFuelLiquidTank and IronEngineFuelsHandler.IronEngineFuelCoolantTank don't respect liquid meta values. If such liquids are added as fuels or coolants to the combustion engine, NPE is thrown as soon as the fuel recipe is shown in the GUI.

Comments (4)

  1. mistaqur repo owner

    Example of mod that cause NPE in this classes (and crash log). IronEngineFuelLiquidTank and IronEngineFuelCoolantTank inherit same class that used to display liquid in Liquid Dictionary. Does this liquid displayed properly in Liquid Dictionary?

  2. octarine noise

    The NPE comes when you move the mouse over the tank, not when showing it first, my bad. The liquid comes from Gregtech and is meta-sensitive. The Liquid Dictionary displays it, and the engine consumes it, no problems. I've pasted the exception below, but i'm under Eclipse (deobfuscated jars), so the line numbers might be off.

    The problem is that IronEngineFuelLiquidTank and the other override the constructor, and don't ItemStack.copy() anymore. The meta value 0 is invalid for the liquid and it gives null for its name. The item slot also looks weird, i'll try to include a screenshot.

    java.lang.NullPointerException
        at mistaqur.nei.common.LiquidHelper.getLiquidName(LiquidHelper.java:30)
        at mistaqur.nei.common.LiquidTank.handleTooltip(LiquidTank.java:59)
        at mistaqur.nei.buildcraft.IronEngineFuelsHandler.handleTooltip(IronEngineFuelsHandler.java:306)
        at codechicken.nei.recipe.GuiRecipe.handleTooltip(GuiRecipe.java:147)
        at codechicken.nei.forge.GuiContainerManager.renderToolTips(GuiContainerManager.java:505)
        at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:219)
        at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1021)
        at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:870)
        at net.minecraft.client.Minecraft.run(Minecraft.java:759)
        at java.lang.Thread.run(Unknown Source)
    

    edit: can't get attachments working. The container item slot shows an invalid texture tile, white box with black text.

  3. Log in to comment