Crafting (8)

All currently available hooks that are found in Carbon. Most hooks would be ones compatible with Oxide, although there are Carbon-only ones as well.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Recycler.CanBeRecycled of Assembly-CSharp.dll.

Example
object CanBeRecycled(Item Item , Recycler Recycler )
{
    Puts("CanBeRecycled was called!");
    return (bool) null;
}
  • Called when the player attempts to craft an item.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ItemCrafter.CanCraft of Assembly-CSharp.dll.

Example
object CanCraft(ItemCrafter ItemCrafter )
{
    Puts("CanCraft was called!");
    return (bool) null;
}
  • Called when the player attempts to craft an item.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PlayerBlueprints.CanCraft of Assembly-CSharp.dll.

Example
object CanCraft(PlayerBlueprints PlayerBlueprints , ItemDefinition ItemDefinition , int Int32 )
{
    Puts("CanCraft was called!");
    return (bool) null;
}
  • Called when the recycler attempts to recycle an item.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Recycler.HasRecyclable of Assembly-CSharp.dll.

Example
object CanRecycle(Recycler Recycler , Item Item )
{
    Puts("CanRecycle was called!");
    return (bool) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches SprayCan.ChangeItemSkin of Assembly-CSharp.dll.

Example
object OnEntityReskin(BaseEntity BaseEntity , ItemSkinDirectory.Skin Skin , BasePlayer BasePlayer )
{
    Puts("OnEntityReskin was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches SprayCan.ChangeItemSkin of Assembly-CSharp.dll.

Example
void OnEntityReskinned(BaseEntity BaseEntity , ItemSkinDirectory.Skin Skin , BasePlayer BasePlayer )
{
    Puts("OnEntityReskinned was called!");
}

This hook requires OnEntityReskin, which loads alongside OnEntityReskinned.

  • Called when ingredients are about to be collected for crafting an item.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ItemCrafter.CollectIngredients of Assembly-CSharp.dll.

Example
object OnIngredientsCollect(ItemCrafter ItemCrafter )
{
    Puts("OnIngredientsCollect was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches SprayCan.CreateSpray of Assembly-CSharp.dll.

Example
object OnSprayCreate(SprayCan SprayCan , UnityEngine.Vector3 Vector3 , UnityEngine.Quaternion Quaternion )
{
    Puts("OnSprayCreate was called!");
    return (object) null;
}

Last updated