Fix divide by 0 error if a recipe has a result with a size of 0 or is otherwise empty
@@ -752,6 +752,7 @@ public class TinkerSmeltery extends TinkerPulse {
if(known.keySet().size() == 1) {
Fluid fluid = known.keySet().iterator().next();
ItemStack output = irecipe.getRecipeOutput().copy();
+ if(!output.isEmpty()) {
int amount = known.get(fluid) / output.getCount();
output.setCount(1);
TinkerRegistry.registerMelting(new MeltingRecipe(RecipeMatch.of(output, amount), fluid));
@@ -760,6 +761,7 @@ public class TinkerSmeltery extends TinkerPulse {
}
}
}
+ }
protected static <E extends Enum<E> & EnumBlock.IEnumMeta & IStringSerializable> BlockSearedStairs registerBlockSearedStairsFrom(IForgeRegistry<Block> registry, EnumBlock<E> block, E value, String name) {
return registerBlock(registry, new BlockSearedStairs(block.getDefaultState().withProperty(block.prop, value)), name);
