# Adding a Client Recipe Type

This documentation will be adding a new type of crafting based on the [Fabric Documentation for Custom Recipe Types](https://docs.fabricmc.net/develop/custom-recipe-types). If you are unfamiliar with how vanilla structures a recipe type, you will want to follow that tutorial first.

To add a new way of crafting, we'll first create a client recipe type.
To do this, create a class that implements `ReliableClientRecipeType` and override the required methods:

### Example
```java
public class UpgradingClientRecipeType implements ReliableClientRecipeType {

    //Create an instance of your client recipe type here
    //Relevant for next steps
    protected static final ReliableClientRecipeType INSTANCE = new ReliableClientRecipeType();


    @Override
    public Component getDisplayName() {
        return Component.literal("Upgrading"); //This is the name of your recipe type, displayed later in the recipe view.
    }

    @Override
    public int getDisplayWidth() {
        return 100; //The width of your type's gui texture
    }

    @Override
    public int getDisplayHeight() {
        return 40; //The height of your type's gui texture
    }

    @Override
    public @Nullable Identifier getGuiTexture() {
        return Identifier.fromNamespaceAndPath("example-mod", "textures/gui/type/upgrading.png"); // The background texture of your recipe.
    }

    @Override
    public int getSlotCount() {
        return 3; //The amount of slots required to show a single recipe of this type - this includes two inputs and a result.
    }

    @Override
    public void placeSlots(RecipeViewMenu.SlotDefinition slotDefinition) {
        //Tell RRV where your slots are located by calling slotDefinition.addItemSlot();
        //NOTE: Slot position is relative to your gui texture

        slotDefinition.addItemSlot(0, 10, 20);
        slotDefinition.addItemSlot(1, 40, 20);
        slotDefinition.addItemSlot(2, 60, 20);

    }

    @Override
    public Identifier getId() {
        return Identifier.fromNamespaceAndPath("example-mod", "upgrading"); // The unique id of this recipe type
    }

    @Override
    public ItemStack getIcon() {
        return ItemStack.EMPTY; //The icon displayed in the recipe view screen
    }

    @Override
    public List<ItemStack> getCraftReferences() {
        return List.of(); //Return a list of blocks/items that can be used to process your recipes (e.g. for Smelting it would be the Furnace)
    }
}
```

With your client recipe type created, you can move on to creating the [Client Recipes](client-recipes) themselves.