Boss Summon things not working...

Phanta5m

Terrarian
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?
 
I dont know whats wrong with it but here's an example from my mod.
using Terraria.ID;
using Terraria.ModLoader;
using Terraria;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GodsOfDeath.Items.Boss
{
public class PixlatedAtomCondenser : ModItem
{
public override void SetStaticDefaults()
{
Tooltip.SetDefault("A pixlated device that condenses the surrounding atoms.");
}

public override void SetDefaults()
{
item.maxStack = 10;
item.width = 50;
item.height = 50;
item.useTime = 20;
item.useAnimation = 45;
item.useStyle = 4;
item.value = 50000;
item.rare = 15;
item.consumable = true;
}

public override bool CanUseItem(Player player)
{
return !NPC.AnyNPCs(mod.NPCType("PixlatedPortal"));
}

public override bool UseItem(Player player)
{
NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("PixlatedPortal"));
return true;
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(mod.ItemType("Lvl1GodlyEsssence"), 50);
recipe.AddIngredient(ItemID.LunarBar, 200);
recipe.AddIngredient(ItemID.IronBar, 100);
recipe.AddIngredient(ItemID.Nanites, 50);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
 
Back
Top Bottom