vboithegreat
Steampunker
Hey Y'all
I'm working on a mod that displays tile info of the active tile. I get the tile data using:
I can't seem to find a way to get the name of the tile.
I have tried these two ways:
1.
2.
Is there any way to get the tile name without specifically hardcoding data values?
Thank you!
I'm working on a mod that displays tile info of the active tile. I get the tile data using:
C#:
int tileX = Player.tileTargetX;
int tileY = Player.tileTargetY;
Tile tile = Main.tile[tileX, tileY];
I can't seem to find a way to get the name of the tile.
I have tried these two ways:
1.
TileID.Search.GetName(tileType)
which only gives the Tile name in the TileSheet, so every single dye plant is under "DyePlants" instead of their respective items (Teal Mushroom, Yellow Marigold, etc.)2.
TileLoader.GetItemDropFromTypeAndStyle(tileType)
and then Lang.GetItemNameValue(dropItemType)
. This works better for normal blocks but still has it's problems: each work bench is listed under "Work Bench." Each Chest is labeled "Chest," even when it is a different variant (like an Ice Chest). Tiles like the Yellow Marigold also have this issue where it displays Teal Mushroom instead.Is there any way to get the tile name without specifically hardcoding data values?
Thank you!