tModLoader (SOLVED) Hi, I'm trying to make an accessory for a mod I'm making, but I keep getting error CS0234

Dr Bustdown

Terrarian
As the title says, I am making a mod. I added a sword with no issue, but now that I am trying to make an accessory, I just can't seem to make it work.
Here is my code for the accessory.

using System;
using Terraria;
using Terraria.ModLoader;
using Terraria.GameContent.Creative;

namespace RiskOfRain2Items.Content.Items.Accessories
{
public class LensMaker : ModItem
{

public override void SetStaticDefaults()
{
DisplayName.SetDefault("Lens Maker's Glasses");
Tooltip.SetDefault("Gives 5% crtical strike chance");
CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
}

public override void SetDefaults()
{
Item.width = 20;
Item.height = 20;

Items.accessory = true;
}

public override void UpdateAccessory(Player player, bool hideVisual)
{
player.GetCritChance(DamageClass.Generic) += 5f;
hideVisual = true;
}
}
}

And here is the error I'm getting
1678417267295.png
 
I just looked at it real hard, and found out my issue, not going to lie I feel real silly right about now. I accidentally said "Items.accessory = true;" when instead of "Items", I have to use "Item". I feel really silly, and a lil bit stupid.
 
Back
Top Bottom