using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ObjectData;
using Microsoft.Xna.Framework;
using Terraria.Enums;
using Terraria.DataStructures;
namespace DarkArmorReforged.Tiles
{
public class FurnaceMod : ModTile
{
public override void SetDefaults()
{
Main.tileSolidTop[Type] = false;
Main.tileFrameImportant[Type] = true;
Main.tileNoAttach[Type] = true;
Main.tileLavaDeath[Type] = true;
TileObjectData.newTile.Width = 4; // Set the width of the tile, 4 in this case.
TileObjectData.newTile.Height = 3; // Set the height of the tile, 4 in this case.
// Set the origin of this tile. This is used when displaying the tile preview.
// Since all Terraria objects are placed from their botom left perspective, we set the Y parameter of the Point to 3.
TileObjectData.newTile.Origin = new Point16(0, 3);
// The following will only allow this tile to be placed on a solid surface all along the way of this tile.
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0);
TileObjectData.newTile.UsesCustomCanPlace = true; // We do use a custom can place.
TileObjectData.newTile.LavaDeath = true; // Optional, guess that speaks for itself.
TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 }; // Since our tile is 4 pieces high, we need to define 4 values here.
TileObjectData.newTile.CoordinateWidth = 16; // The width of each of the tile pieces (default is 16).
TileObjectData.newTile.CoordinatePadding = 2; // The padding of each tile piece on the tilesheet.
TileObjectData.addTile(Type);
AddMapEntry(new Color(255, 255, 255), "FurnaceMod");
adjTiles = new int[] { TileID.Anvils };
AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch);
}
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
Item.NewItem(i * 16, j * 16, 48, 48, mod.ItemType("FurnaceMod"));
}
}
}