Hi. I need some help with my boss summon item. There are no errors, the music plays, and everything seems to work, except my boss doesn't actually spawn. Here's my code:
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
namespace MayhemMod.Items.BossSummons
{
public class SuspiciousLookingBoulder : ModItem
{
public override void SetStaticDefaults() {
Tooltip.SetDefault("This summons the Gemstone Cluster...");
ItemID.Sets.SortingPriorityBossSpawns[item.type] = 13;
}
public override void SetDefaults() {
item.width = 20;
item.height = 20;
item.maxStack = 20;
item.rare = ItemRarityID.Blue;
item.useAnimation = 45;
item.useTime = 45;
item.useStyle = ItemUseStyleID.HoldingUp;
item.UseSound = SoundID.Item44;
item.consumable = true;
}
public override bool UseItem(Player player) {
NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("GemstoneCluster"));
Main.PlaySound(SoundID.Roar, player.position, 0);
return true;
}
public override void AddRecipes() {
ModRecipe recipe = new ModRecipe(mod);
recipe.AddTile(TileID.CookingPots);
recipe.AddIngredient(ItemID.stone, 25);
recipe.AddIngredient(ItemID.boulder, 5);
recipe.SetResult(this, 1);
}
}
}
I am extremely new to this stuff, so please try to keep everything simple. Can anyone help?
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
namespace MayhemMod.Items.BossSummons
{
public class SuspiciousLookingBoulder : ModItem
{
public override void SetStaticDefaults() {
Tooltip.SetDefault("This summons the Gemstone Cluster...");
ItemID.Sets.SortingPriorityBossSpawns[item.type] = 13;
}
public override void SetDefaults() {
item.width = 20;
item.height = 20;
item.maxStack = 20;
item.rare = ItemRarityID.Blue;
item.useAnimation = 45;
item.useTime = 45;
item.useStyle = ItemUseStyleID.HoldingUp;
item.UseSound = SoundID.Item44;
item.consumable = true;
}
public override bool UseItem(Player player) {
NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("GemstoneCluster"));
Main.PlaySound(SoundID.Roar, player.position, 0);
return true;
}
public override void AddRecipes() {
ModRecipe recipe = new ModRecipe(mod);
recipe.AddTile(TileID.CookingPots);
recipe.AddIngredient(ItemID.stone, 25);
recipe.AddIngredient(ItemID.boulder, 5);
recipe.SetResult(this, 1);
}
}
}
I am extremely new to this stuff, so please try to keep everything simple. Can anyone help?