1. These forums are being retired. Please ask all questions and help threads and any other type of discussions on GitHub. During this time, new threads and user registrations have been disabled.

Event to find out tile id after change.

Discussion in 'Plugin Discussion' started by jwplaster, May 12, 2019.

  1. jwplaster

    jwplaster Level 4

    Joined:
    Mar 18, 2013
    Messages:
    77
    Hi, tshock forum!
    I decided here to remember a little the old and create a plugin. However, I encountered a difficulty that I can’t find out the tile or block id after its creation.
    I tried to use the following option:

    Code:
    void OnTileEdit(object sender, GetDataHandlers.TileEditEventArgs t)
            {
                var titleID = Main.tile[t.X, t.Y].type;
            }
    However, this only works well on resolving the tiles or blocks.

    I got the idea to check the same coordinates after installing the unit, with the help of the event update, but I consider this a “bicycle”.

    Tell me, please, a good option or send to the necessary event.

    Thank!
     
  2. Zaicon

    Zaicon Spam Cleaner 9000
    TShock Mod Plugin Developer

    Joined:
    Feb 15, 2014
    Messages:
    811
    You should be able to find the new tile ID in the TileEditEventArgs provided.