• Switch 1.4: New patch released Jan 18, details are here. Read the full release details here. Report bugs here.

tModLoader Debugging Help

Status
Not open for further replies.

Athrisir

Terrarian
Hi, not sure if this is where it should go but I thought this was a good spot for this thread.

So, I've been working on coding a weapon, but no matter what I do, nothing works. I've tried video tutorials and copied the code from those and edited it for my mod and it still did nothing. Any help?
Here's the code:
Code:
using System;
using Terraria;
using Terraria.ModLoader;

namespace KnifeMod.items
{
    public class WoodKnife : ModItem
    {
        public override void SetDefaults()
        {
            item.name = "Wood Knife";
            item.damage = 4;
            item.melee = true;
            item.width = 26;
            item.height = 26;
            item.toolTip = "FYI I am spy";
            item.useTime = 10;
            item.useAnimation = 20;
            item.useStyle = 1;
            item.knockBack = 0;
            item.value = 300;
            item.rare = 1;
            item.useSound = 1;
            item.autoReuse = true;
        }

        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.Wood, 10);
            recipe.AddTile(18);
            recipe.SetResult(this, 1);
            recipe.AddRecipe();
        }

       
    }
}

Thanks!
-Giga
 
Status
Not open for further replies.
Top Bottom