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 self)
{
    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 self)
{
    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 self, ItemDefinition local0, int skinItemId)
{
    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 self, Item local1)
{
    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 local4, ItemSkinDirectory.Skin local10, BasePlayer player)
{
    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 local4, ItemSkinDirectory.Skin local10, BasePlayer player)
{
    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 self)
{
    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 self, UnityEngine.Vector3 local0, UnityEngine.Quaternion local5)
{
    Puts("OnSprayCreate was called!");
    return (object) null;
}

Last updated