private static int findFuelValue(ItemStack stack) { try { Item item = stack.getItem(); if (item instanceof ItemBlock) { Block block = InvTools.getBlockFromStack(stack); String name = block.getUnlocalizedName(); if (name != null && name.contains("blockScaffold")) return 0; } // if (itemID == Item.coal.itemID && stack.getItemDamage() == 0) // return 1600; if (item == Items.blaze_rod) return 1000; FluidStack liquid = FluidItemHelper.getFluidStackInContainer(stack); if (liquid != null && Fluids.LAVA.get() == liquid.getFluid()) return liquid.amount; String name = stack.getItem().getUnlocalizedName(); if (name != null && name.contains("itemScrap")) return 0; return TileEntityFurnace.getItemBurnTime(stack); } catch (Exception ex) { Game.logThrowable( "Error in Fuel Handler! Is some mod creating items that are not compliant with standards?", ex); } return 0; }
@Override public boolean isAllowedFilterItem(ItemStack stack) { return FluidItemHelper.isFilledContainer(stack); }