Итак, я делаю свой собственный мод Terraria, но у меня есть одна проблема, заключающаяся в том, что когда я использую один из элементов из моего мода в рецепте Crating для чего -то другого в моем моде, это дает мне ошибку. Я уверен, что код все в порядке. < /P>
Это элемент, который использует что -то из моего мода: < /p>
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Graphics.Effects;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace TestMod.Items.Weapons //Where it is located
{
public class BladeOfTheElements : ModItem
{
public override void SetDefaults()
{
item.name = "Blade Of The Elements"; //Sword name
item.damage = 26; //Sword damage - Damage is x2.5 - 43 here = 109 in game
item.crit = -46; //Crit chance of the weapon
item.melee = true; //Is it a melee item?
item.width = 74; //Sword width
item.height = 74; //Sword height
item.toolTip = "A blade containing the power of; Fire, Ice and Forest"; //Item Description
item.useTime = 23; //How fast is the item? How fast does it swing or shoot?
item.useAnimation = 23;
item.useStyle = 1; //How is the item used? 1 is sword
item.knockBack = 4; //The knockback of the item
item.value = 100000; //How much does it sell for? 100 = 1 Silver
item.rare = 5;
item.useSound = 1; //What sound type? 1 is sword
item.autoReuse = true; //If it's a sword can it autoswing?
item.useTurn = true;
item.shoot = mod.ProjectileType("BladeOfTheElementsProj");
item.shootSpeed = 6f; //Speed of the projectile
}
public override void AddRecipes() //How do you craft the item?
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.BladeOfTheForest, 1); //What do you need to craft the item? (Use 1 dirt block for testing)
recipe.AddIngredient(ItemID.BladeOfIce, 1);
recipe.AddIngredient(ItemID.BladeOfTheDemons, 1);
recipe.AddTile(TileID.Anvils); //Where is it made? Work bench, anvil, water? etc (Use worck bench for testing)
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
< /code>
Все лезвия в рецепте крафта внизу находятся от моего мода, но я получаю эту ошибку, когда я пытаюсь скомпилировать свой мод: < /p>
Произошла ошибка при составлении мода. < /p>
c:/Users/Nicolas/Documents/My Games/Terraria/ModLoader/Mod Sources/TestMod/Items/Weapons/BladeOfTheElements.cs(37,41) : error CS0117: 'Terraria.ID.ItemID' does not contain a definition for 'BladeOfTheForest'
< /code>
Я бы просто хотел указать, что когда я использовал грязные блоки для рецепта (для проверки оружия), я мог бы просто скомпилировать мод. < /p>
Подробнее здесь: https://stackoverflow.com/questions/378 ... tmodloader
C# MOD Compile Error (TModloader) ⇐ C#
Место общения программистов C#
1751305059
Anonymous
Итак, я делаю свой собственный мод Terraria, но у меня есть одна проблема, заключающаяся в том, что когда я использую один из элементов из моего мода в рецепте Crating для чего -то другого в моем моде, это дает мне ошибку. Я уверен, что код все в порядке. < /P>
Это элемент, который использует что -то из моего мода: < /p>
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Graphics.Effects;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace TestMod.Items.Weapons //Where it is located
{
public class BladeOfTheElements : ModItem
{
public override void SetDefaults()
{
item.name = "Blade Of The Elements"; //Sword name
item.damage = 26; //Sword damage - Damage is x2.5 - 43 here = 109 in game
item.crit = -46; //Crit chance of the weapon
item.melee = true; //Is it a melee item?
item.width = 74; //Sword width
item.height = 74; //Sword height
item.toolTip = "A blade containing the power of; Fire, Ice and Forest"; //Item Description
item.useTime = 23; //How fast is the item? How fast does it swing or shoot?
item.useAnimation = 23;
item.useStyle = 1; //How is the item used? 1 is sword
item.knockBack = 4; //The knockback of the item
item.value = 100000; //How much does it sell for? 100 = 1 Silver
item.rare = 5;
item.useSound = 1; //What sound type? 1 is sword
item.autoReuse = true; //If it's a sword can it autoswing?
item.useTurn = true;
item.shoot = mod.ProjectileType("BladeOfTheElementsProj");
item.shootSpeed = 6f; //Speed of the projectile
}
public override void AddRecipes() //How do you craft the item?
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.BladeOfTheForest, 1); //What do you need to craft the item? (Use 1 dirt block for testing)
recipe.AddIngredient(ItemID.BladeOfIce, 1);
recipe.AddIngredient(ItemID.BladeOfTheDemons, 1);
recipe.AddTile(TileID.Anvils); //Where is it made? Work bench, anvil, water? etc (Use worck bench for testing)
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
< /code>
Все лезвия в рецепте крафта внизу находятся от моего мода, но я получаю эту ошибку, когда я пытаюсь скомпилировать свой мод: < /p>
Произошла ошибка при составлении мода. < /p>
c:/Users/Nicolas/Documents/My Games/Terraria/ModLoader/Mod Sources/TestMod/Items/Weapons/BladeOfTheElements.cs(37,41) : error CS0117: 'Terraria.ID.ItemID' does not contain a definition for 'BladeOfTheForest'
< /code>
Я бы просто хотел указать, что когда я использовал грязные блоки для рецепта (для проверки оружия), я мог бы просто скомпилировать мод. < /p>
Подробнее здесь: [url]https://stackoverflow.com/questions/37886446/c-sharp-mod-compile-error-tmodloader[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия