Skip to content

OnItemCraft

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnItemCraft( IndustrialCrafter instance, ItemBlueprint blueprint )
{
    Puts( "OnItemCraft works!" );
}

Location

  • IndustrialCrafter::RunJob()
csharp
//---
	{
		Item targetBlueprint = this.GetTargetBlueprint(i);
		if (targetBlueprint != null && !(this.GetWorkbench() == null) && this.GetWorkbench().Workbenchlevel >= targetBlueprint.blueprintTargetDef.Blueprint.workbenchLevelRequired)
		{
			ItemBlueprint blueprint = targetBlueprint.blueprintTargetDef.Blueprint;
			if (Interface.CallHook("OnItemCraft", this, blueprint) != null)
			{
				return;
			}
			bool flag = true;
			foreach (ItemAmount current in blueprint.ingredients)
//---

Released under the MIT License.