Whole code
the error is in line 32
CS1061 'Mod' does not contain a definition for 'ProjectileType' and no accessible extension method 'ProjectileType' accepting a first argument of type 'Mod' could be found (are you missing a using directive or an assembly reference?)
Code:
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
namespace Swords.Items
{
public class ApollosGreatBow : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Apollo's Greatbow");
Tooltip.SetDefault("The most feared bow in all of Terraria");
}
public override void SetDefaults()
{
Item.damage = 59;
Item.DamageType = DamageClass.Ranged;
Item.scale = 1.5f;
Item.useTime = 27;
Item.useAnimation = 27;
Item.useStyle = 5;
Item.knockBack = 3;
Item.value = 100000;
Item.rare = 8;
Item.UseSound = SoundID.Item5;
Item.autoReuse = true;
Item.shoot = Mod.ProjectileType("ApollosWrath");
Item.useAmmo = AmmoID.Arrow;
Item.shootSpeed = 7.5f;
}
public override void AddRecipes()
{
Recipe recipe = CreateRecipe();
recipe.AddIngredient(ItemID.JungleSpores, 1);
recipe.AddIngredient(ItemID.NaturesGift, 12);
recipe.AddIngredient(ItemID.JungleRose, 1);
recipe.AddIngredient(ItemID.Vine, 3);
recipe.AddIngredient(null, "AncientMahoganyTrunk", 1);
recipe.AddTile(TileID.MythrilAnvil);
recipe.Register();
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(BuffID.Frostburn, 120);
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
Dust.NewDust(hitbox.Location.ToVector2(), hitbox.Width, hitbox.Height, DustID.IceTorch);
}
}
}
}
the error is in line 32
CS1061 'Mod' does not contain a definition for 'ProjectileType' and no accessible extension method 'ProjectileType' accepting a first argument of type 'Mod' could be found (are you missing a using directive or an assembly reference?)