tModLoader How do I make this tile not destroy the game?

jaractus

Ice Queen
I made this item for my mod, but I have literally no clue how to get this to work. I would post the sprites but for some reason I'm not able to right now, but each "tile" on the tile sprite is 16x18, like others I've seen, and it's 3x2 of these "tiles". It's not animated.

Item Code:
Code:
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace MageIsland.Items.Placeables.CraftingStations
{
    public class RougeForge : ModItem
    {
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("Rouge Forge");
            Tooltip.SetDefault("The Forge that the Rouge Blacksmith used to use."
                + "\nGiven to them by the martians during the time of peace.");
        }

        public override void SetDefaults()
        {
            item.width = 48;
            item.height = 32;
            item.maxStack = 99;
            item.useTurn = true;
            item.autoReuse = true;
            item.useAnimation = 15;
            item.useTime = 10;
            item.useStyle = 1;
            item.consumable = true;
            item.value = Item.sellPrice(platinum: 5);
            item.createTile = mod.TileType("RougeForge");
        }
    }
}

Tile Code:
Code:
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ObjectData;

namespace MageIsland.Tiles.CraftingStations
{
    public class RougeForge : ModTile
    {
        public override void SetDefaults()
        {
            Main.tileFrameImportant[Type] = true;
            Main.tileNoAttach[Type] = true;
            Main.tileLavaDeath[Type] = true;
            TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2);
            TileObjectData.newTile.CoordinateHeights = new int[] { 18 };
            TileObjectData.addTile(Type);
            ModTranslation name = CreateMapEntryName();
            name.SetDefault("Rouge Forge");
            AddMapEntry(new Color(200, 0, 0), name);
            disableSmartCursor = true;
            adjTiles = new int[] { TileID.AdamantiteForge };
        }

        public override void KillMultiTile(int i, int j, int frameX, int frameY)
        {
            Item.NewItem(i * 16, j * 16, 32, 16, mod.ItemType("RougeForge"));
        }
    }
}

Please tell me what I need to fix. Thanks.
 
TileObjectData.newTile.CoordinateHeights = new int[] { 16, 18 };, this is explained in the ModTile guide on the wiki.
 
Back
Top Bottom