tModLoader Custom solution firing inferno fork bolt instead of hallowed spray?

MelonMann

Terrarian
i'm making infinite versions of some items for my mod and i've come across the weirdest bug, when using one of the infinite clentaminator solutions, it will use the inferno fork projectile for some reason

i provided a video in a zip file if you wanna see it, but here's my code:

C#:
using Terraria;
using Terraria.ID;
using Terraria.GameContent.Creative;
using Terraria.ModLoader;

namespace SandboxMod.Content.Ammo
{
    public class InfiniteBlueSolution : ModItem
    {
        public override void SetStaticDefaults() {
            Tooltip.SetDefault("Used by the Clentaminator\nSpreads the hallow");

            CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
        }

        public override void SetDefaults() {
            Item.shoot = ProjectileID.HallowSpray;
            Item.ammo = AmmoID.Solution;
            Item.width = 10;
            Item.height = 12;
            Item.value = Item.buyPrice(0, 0, 25);
            Item.rare = ItemRarityID.Orange;
            Item.maxStack = 1;
            Item.consumable = false;
        }

        public override void AddRecipes()
        {
            Recipe recipe = CreateRecipe();
            recipe.AddIngredient(ItemID.BlueSolution, 20);
            recipe.AddIngredient(ModContent.ItemType<Content.Items.Materials.EmptyPouch>(), 1);
            recipe.AddTile(TileID.CrystalBall);
            recipe.Register();
        }
    }
}

this is in the 1.4-stable branch btw
 

Attachments

  • 2022-08-08 18-13-04.mp4.7z
    5.8 MB · Views: 31
i'm making infinite versions of some items for my mod and i've come across the weirdest bug, when using one of the infinite clentaminator solutions, it will use the inferno fork projectile for some reason

i provided a video in a zip file if you wanna see it, but here's my code:

C#:
using Terraria;
using Terraria.ID;
using Terraria.GameContent.Creative;
using Terraria.ModLoader;

namespace SandboxMod.Content.Ammo
{
    public class InfiniteBlueSolution : ModItem
    {
        public override void SetStaticDefaults() {
            Tooltip.SetDefault("Used by the Clentaminator\nSpreads the hallow");

            CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
        }

        public override void SetDefaults() {
            Item.shoot = ProjectileID.HallowSpray;
            Item.ammo = AmmoID.Solution;
            Item.width = 10;
            Item.height = 12;
            Item.value = Item.buyPrice(0, 0, 25);
            Item.rare = ItemRarityID.Orange;
            Item.maxStack = 1;
            Item.consumable = false;
        }

        public override void AddRecipes()
        {
            Recipe recipe = CreateRecipe();
            recipe.AddIngredient(ItemID.BlueSolution, 20);
            recipe.AddIngredient(ModContent.ItemType<Content.Items.Materials.EmptyPouch>(), 1);
            recipe.AddTile(TileID.CrystalBall);
            recipe.Register();
        }
    }
}

this is in the 1.4-stable branch btw
A little strange, but I caught the logic. Apparently the Clentaminator uses other projectile IDs to fire. Instead of the standard order, projectiles of solutions come first, and then all the standard ones. Basically the order looks like this:
0 - Pure Spray
1-Hallow Spray
2-Corrupt Spray
3 - Mushroom Spray
4 - Crimson Spray
5 and beyond follow the standard from first to last. So instead of ProjectileID.HallowSpray just use 1
 
A little strange, but I caught the logic. Apparently the Clentaminator uses other projectile IDs to fire. Instead of the standard order, projectiles of solutions come first, and then all the standard ones. Basically the order looks like this:
0 - Pure Spray
1-Hallow Spray
2-Corrupt Spray
3 - Mushroom Spray
4 - Crimson Spray
5 and beyond follow the standard from first to last. So instead of ProjectileID.HallowSpray just use 1
thanks, i'll see if this works

edit: worked! tysm
 
Last edited:
Back
Top Bottom