bubobucks
Terrarian
I'm a new modder, so I apologize if this is a dumb question.
I have a few swords in my mod and they all work as expected, but my newest sword seems to have a hitbox of just one pixel. I messed with the width and height, but nothing changes. Am I doing anything wrong, or is there some obvious syntax error?
Thank you in advance for any help, I appreciate it!
I have a few swords in my mod and they all work as expected, but my newest sword seems to have a hitbox of just one pixel. I messed with the width and height, but nothing changes. Am I doing anything wrong, or is there some obvious syntax error?
C#:
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace MODNAME.Items.Weapons
{
public class SWORDNAME : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("SWORD NAME");
Tooltip.SetDefault("The beginning of a journey");
}
public override void SetDefaults()
{
item.damage = 20;
item.melee = true;
item.useAnimation = 20;
item.useStyle = 1;
item.knockBack = 5;
item.width = 900;
item.height = 3600;
item.maxStack = 1;
item.value = 5000;
item.rare = -12;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.CopperShortsword);
recipe.AddIngredient(ItemID.WoodenSword);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Thank you in advance for any help, I appreciate it!