using CalamityMod.Items.Materials; using CalamityMod.Tiles.LivingFire; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.LivingFire { public class LivingHolyFireBlock : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Placeables"; public override void SetStaticDefaults() { Item.ResearchUnlockCount = 100; } public override void SetDefaults() { Item.width = 10; Item.height = 12; Item.maxStack = 9999; Item.useTurn = true; Item.autoReuse = true; Item.useAnimation = 15; Item.useTime = 10; Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); } public override void PostUpdate() { Lighting.AddLight((int)((Item.position.X + Item.width / 2) / 16f), (int)((Item.position.Y + Item.height / 2) / 16f), 1f, 1f, 0f); } public override void AddRecipes() { CreateRecipe(20).AddIngredient(ItemID.LivingFireBlock, 20).AddIngredient(ModContent.ItemType()).Register(); } } }