MechaDasÜberGoober
Plantera
Title
I am confused, here is code:
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using TheElementalCollapseMod;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
namespace TheElementalCollapseMod.Items
{
public class RazorGrass : ModItem
{
public override void SetStaticDefaults()
{
// DisplayName.SetDefault("PieceOfBark"); // By default, capitalization in classnames will add spaces to the display name. You can customize the display name here by uncommenting this line.
Tooltip.SetDefault("A usually quite common species of grass that grows with serrated blades, touched by elemental energy. Shoots a sharp leaf.");
}
public override void SetDefaults()
{
Item.damage = 25;
Item.DamageType = DamageClass.Melee;
Item.width = 40;
Item.height = 40;
Item.useTime = 20;
Item.useAnimation = 20;
Item.useStyle = 1;
Item.knockBack = 10;
Item.value = 100;
Item.rare = 2;
Item.UseSound = SoundID.Item1;
Item.autoReuse = false;
Item.shoot = ModContent.ProjectileType<Projectiles.RazorGrassProjectile>();
Item.shootSpeed = 15f;
}
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
var lineToChange = tooltips.FirstOrDefault(x => x.Name == "Damage" && x.Mod == "Terraria");
if(lineToChange != null)
{
string[] split = lineToChange.Text.Split(' ');
lineToChange.Text = split.First() + " elemental " + split.Last();
}
}
public override void ModifyWeaponDamage(Player player, ref StatModifier damage)
{
damage += player.GetModPlayer<GlobalPlayer>().elementalDamage;
}
public override void AddRecipes()
{
Recipe recipe = CreateRecipe();
recipe.AddIngredient(ItemID.DirtBlock, 100);
recipe.AddIngredient(ItemID.JungleGrassSeeds, 10);
recipe.AddIngredient(ItemID.Wood, 100);
recipe.AddTile(TileID.Anvils);
recipe.Register();
}
}
}
I am confused, here is code:
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using TheElementalCollapseMod;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
namespace TheElementalCollapseMod.Items
{
public class RazorGrass : ModItem
{
public override void SetStaticDefaults()
{
// DisplayName.SetDefault("PieceOfBark"); // By default, capitalization in classnames will add spaces to the display name. You can customize the display name here by uncommenting this line.
Tooltip.SetDefault("A usually quite common species of grass that grows with serrated blades, touched by elemental energy. Shoots a sharp leaf.");
}
public override void SetDefaults()
{
Item.damage = 25;
Item.DamageType = DamageClass.Melee;
Item.width = 40;
Item.height = 40;
Item.useTime = 20;
Item.useAnimation = 20;
Item.useStyle = 1;
Item.knockBack = 10;
Item.value = 100;
Item.rare = 2;
Item.UseSound = SoundID.Item1;
Item.autoReuse = false;
Item.shoot = ModContent.ProjectileType<Projectiles.RazorGrassProjectile>();
Item.shootSpeed = 15f;
}
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
var lineToChange = tooltips.FirstOrDefault(x => x.Name == "Damage" && x.Mod == "Terraria");
if(lineToChange != null)
{
string[] split = lineToChange.Text.Split(' ');
lineToChange.Text = split.First() + " elemental " + split.Last();
}
}
public override void ModifyWeaponDamage(Player player, ref StatModifier damage)
{
damage += player.GetModPlayer<GlobalPlayer>().elementalDamage;
}
public override void AddRecipes()
{
Recipe recipe = CreateRecipe();
recipe.AddIngredient(ItemID.DirtBlock, 100);
recipe.AddIngredient(ItemID.JungleGrassSeeds, 10);
recipe.AddIngredient(ItemID.Wood, 100);
recipe.AddTile(TileID.Anvils);
recipe.Register();
}
}
}