tModLoader  0.12 Alpha
A mod to make and play Terraria mods
Terraria.GameContent.Tile_Entities.TELogicSensor Class Reference

Inherits Terraria.DataStructures.TileEntity.

Public Types

enum class  LogicCheckType {
  None , Day , Night , PlayerAbove ,
  Water , Lava , Honey , Liquid

Public Member Functions

void ChangeState (bool onState, bool TripWire)
void FigureCheckState ()
override TileEntity GenerateInstance ()
override bool IsTileValidForEntity (int x, int y)
override void NetPlaceEntityAttempt (int x, int y)
override void ReadExtraData (BinaryReader reader, bool networkSend)
override void RegisterTileEntityID (int assignedID)
override string ToString ()
override void Update ()
override void WriteExtraData (BinaryWriter writer, bool networkSend)
- Public Member Functions inherited from Terraria.DataStructures.TileEntity
virtual string GetItemGamepadInstructions (int slot=0)
virtual void LoadData (TagCompound tag)
 Allows you to load custom data that you have saved for this tile entity.
Try to write defensive loading code that won't crash if something's missing. More...
virtual void NetReceive (BinaryReader reader)
 Receives the data sent in the NetSend hook. Called on MP Client when receiving tile data (!lightReceive) and when a MessageID.TileEntitySharing message is sent (lightReceive) More...
virtual void NetSend (BinaryWriter writer)
 Allows you to send custom data for this tile entity between client and server. This is called on the server while sending tile data (!lightSend) and when a MessageID.TileEntitySharing message is sent (lightSend) More...
virtual void OnInventoryDraw (Player player, SpriteBatch spriteBatch)
virtual void OnPlayerUpdate (Player player)
virtual bool OverrideItemSlotHover (Item[] inv, int context=0, int slot=0)
virtual bool OverrideItemSlotLeftClick (Item[] inv, int context=0, int slot=0)
virtual void SaveData (TagCompound tag)
 Allows you to save custom data for this tile entity.

NOTE: The provided tag is always empty by default, and is provided as an argument only for the sake of convenience and optimization.
NOTE: Try to only save data that isn't default values. More...
virtual bool TryGetItemGamepadOverrideInstructions (Item[] inv, int context, int slot, out string instruction)

Static Public Member Functions

static LogicCheckType FigureCheckType (int x, int y, out bool on)
static int Find (int x, int y)
static void GetFrame (int x, int y, LogicCheckType type, bool on)
static bool GetState (int x, int y, LogicCheckType type, TELogicSensor instance=null)
static int Hook_AfterPlacement (int x, int y, int type=423, int style=0, int direction=1, int alternate=0)
static void Kill (int x, int y)
static void NetPlaceEntity (int x, int y)
static int Place (int x, int y)
static bool SanityCheck (int x, int y)
static bool ValidTile (int x, int y)
- Static Public Member Functions inherited from Terraria.DataStructures.TileEntity
static int AssignNewID ()
static void BasicOpenCloseInteraction (Player player, int x, int y, int id)
static void Clear ()
static void InitializeAll ()
static bool IsOccupied (int id, out int interactingPlayer)
static void PlaceEntityNet (int x, int y, int type)
static TileEntity Read (BinaryReader reader, bool networkSend=false, bool lightSend=false)
static void SetInteractionAnchor (Player player, int x, int y, int id)
static void UpdateEnd ()
static void UpdateStart ()
static void Write (BinaryWriter writer, TileEntity ent, bool networkSend=false, bool lightSend=false)

Public Attributes

int CountedData
LogicCheckType logicCheck
bool On
- Public Attributes inherited from Terraria.DataStructures.TileEntity
int ID
Point16 Position
byte type

Additional Inherited Members

- Static Public Attributes inherited from Terraria.DataStructures.TileEntity
static Dictionary< int, TileEntityByID = new Dictionary<int, TileEntity>()
static Dictionary< Point16, TileEntityByPosition = new Dictionary<Point16, TileEntity>()
static object EntityCreationLock = new object()
static TileEntitiesManager manager
const int MaxEntitiesPerChunk = 1000
static int TileEntitiesNextID
- Events inherited from Terraria.DataStructures.TileEntity
static Action _UpdateEnd
static Action _UpdateStart