private static bool AddEntity(TileEntityBase tileEntity, int entityID) { if (registeredEntities.ContainsKey(entityID)) { return(false); } registeredEntities.Add(entityID, tileEntity); return(true); }
public static void SetTileEntity(int x, int y, TileEntityBase tileEntity) { //exit setting code if the tile entity or tile entity id was not specified if (tileEntity == null) { return; } string tileEntityGridID = GetTileEntityID(x, y); DeleteTile(x, y); SetTileEntity(x, y, tileEntity.entityID); }