I am following a tutorial on YouTube to create a simple sword with a custom recipe in tModLoader 1.4. (I am using cheatsheat to give myself the items, and I want to be able to craft my sword with an anvil and 8 tutorial items). The link to the tutorial is https://www.youtube.com/watch?v=2HS3OV6xuNI&ab_channel=Lynx if you need.
The item code:
using Terraria.ModLoader;
using Terraria.ID;
using Terraria.GameContent.Creative;
using Microsoft.Xna.Framework;
namespace OverpoweredStuff.Content.Items
{
internal class TutorialItem : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Tutorial Item");
Tooltip.SetDefault("pog");
CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 100;
}
public override void SetDefaults()
{
Item.width = 16;
Item.height = 16;
Item.value = Item.buyPrice(copper: 5);
Item.maxStack = 999;
}
}
}
The code for the sword:
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using Terraria.GameContent.Creative;
namespace TutorialMod.Content.Items.Weapons
{
internal class TutorialSword : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Tutorial Sword");
Tooltip.SetDefault("This is a modded Broadsword");
CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
}
public override void SetDefaults()
{
Item.width = 32;
Item.height = 32;
Item.useStyle = ItemUseStyleID.Swing;
Item.useTime = 20;
Item.useAnimation = 20;
Item.autoReuse = true;
Item.DamageType = DamageClass.Melee;
Item.damage = 69;
Item.knockBack = 3.5f;
Item.crit = 5;
Item.value = Item.buyPrice(silver: 80, copper: 50);
Item.rare = ItemRarityID.Blue;
Item.UseSound = SoundID.Item1;
}
public override void AddRecipes()
{
CreateRecipe()
.AddIngredients(ModContent.ItemType<TutorialItem>(), 8)
.AddTile(TileID.Anvils)
.Register();
}
}
}
The error:
My files are structured like this:

EDIT:
I noticed an error on the first line of create recipe with < instead of >, and now get this error:

When trying with a vanilla material .AddIngredient(2, 8) I get the original error.