BlackFenix06
Terrarian
Hello to all. I'm having a problem and I honestly do not know how to solve it. Given that I've just started and I'm trying to learn. I created a 32x32 block, but when I place it I get this:
The problem is that once you have placed the block, everything becomes gray and the other problem, well, you can very well see from the video.
Items\Placeable\AlloySmelter.cs:
Tiles\AlloySmelter.cs:
I used as an example, the code in "exampleMod" concerning the chest, the bed and the trophy.
The problem is that once you have placed the block, everything becomes gray and the other problem, well, you can very well see from the video.
Items\Placeable\AlloySmelter.cs:
Code:
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace IndustrialMod.Items.Placeable
{
public class AlloySmelter : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Fonderia");
Tooltip.SetDefault("Utilizzato per ottenere nuovi materiali");
}
public override void SetDefaults()
{
item.width = 32;
item.height = 32;
item.value = 10000;
item.useStyle = 1;
item.useTime = 20;
item.useAnimation = 20;
item.useTurn = true;
item.autoReuse = true;
item.consumable = true;
item.createTile = mod.TileType("AlloySmelter");
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.DirtBlock, 10);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Tiles\AlloySmelter.cs:
Code:
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace IndustrialMod.Tiles
{
public class AlloySmelter : ModTile
{
public override void SetDefaults()
{
Main.tileNoAttach[Type] = true;
Main.tileTable[Type] = true;
Main.tileBlockLight[Type] = true;
Main.tileLighted[Type] = true;
TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2);
TileObjectData.addTile(Type);
drop = mod.ItemType("AlloySmelter");
}
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
Item.NewItem(i * 32, j * 32, 32, 32, mod.ItemType("AlloySmelter"));
}
}
}
I used as an example, the code in "exampleMod" concerning the chest, the bed and the trophy.